I have a Dockerfile with the following line:
COPY *.zip ~user1
The user user1
already exists and has a home directory (i.e. /home/user1
). The goal, of course, is to copy the zip file into that user's home dir, however the result of the above is that the zip file is copied to a file named literally /~user1
in the image.
The following does work as expected:
COPY *.zip /home/user1
Is this a bug in Docker or is there a limitation related to tilde expansion that I'm not aware of?
Using Docker 1.13.0 on Mac.
Tilde expansion for
COPY
is not supported.From The COPY docs:
Example: