I'm trying to copy a number of files and folders to a docker image build from my localhost.
The files are like this:
folder1
file1
file2
folder2
file1
file2
I'm trying to make the copy like this:
COPY files/* /files/
However, all files are placed in /files/ is there a way in Docker to keep the subdirectory structure as well as copying the files into their directories?
Remove star from COPY, with this Dockerfile:
Structure is there:
Alternatively you can use a "." instead of *, as this will take all the files in the working directory, include the folders and subfolders: