I tried the following command in my Dockerfile: COPY * /
and got mighty surprised at the result. Seems the naive docker code traverses the directories from the glob
ADD
(docs)The ADD
command can accept as a
parameter:
ADD folder /path/inside/your/container
or
tar -cvzf newArchive.tar.gz /path/to/your/folder
You would then add a line to your Dockerfile like this:
ADD /path/to/archive/newArchive.tar.gz /path/inside/your/container
Notes:
ADD
will automatically extract your archive.