How is the docker COPY
command supposed to work when there is a windows directory junction in the directory you are copying?
More Details...
Older docker versions (<18.0) seem to copy the contents of the directory junction to the target directory. Newer versions (18.0) seem to copy the symlink itself, and if the link target does not exist in the container, the link will be invalid.
For more background, my directory structure looks something like this:
C:\Project>dir .
02/06/2018 08:38 AM <DIR> .
02/06/2018 08:38 AM <DIR> ..
02/05/2018 07:09 PM 4,002 program.py
02/05/2018 07:09 PM 123 Dockerfile
01/29/2018 10:50 PM <JUNCTION> mylib [C:\Lib\mylib]
The Dockerfile
command looks like this:
COPY . /home/foo
I would expect the COPY
command to copy program.py
and the contents of mylib
into the container (and this is what happened on older docker versions), but newer docker images copy the junction itself.