What am I doing wrong please ?
I’m using Docker 20.10.24, my host is a debian 12 as well as my container.
I tried to use COPY, but it doesn’t not work with URLs. I just want to download the content of the remote directory inside my container.
You can not add a folder via http. Http only has single files specified, no directory listing, so it can not iterate over potential files on the server.
If the src for an ADD instruction is an URL, only a single get request will be made. Either you are going to follow the suggestion of @bluepuma77 and make the url return a single tar file archive using a supported compression format (identity , gzip , bzip2 or xz), or you will have to add as many ADD instructions as files that you want to download.
Though, what you need could be a wget command in a RUN instruction that recursively downloads or mirrors a subpath of a URL. A short google search should yield plenty of blog post for this subject.