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
Suppose you want to copy the contents from a folder where you have docker file into your container. Use ADD:
RUN mkdir /temp
ADD folder /temp/Newfolder
it will add to your container with temp/newfolder
folder is the folder/directory where you have the dockerfile, more concretely, where you put your content and want to copy that.
Now can you check your copied/added folder by runining container and see the content using ls