Docker (and other tools) appear to not properly convert directory symlinks on either docker build
+COPY . .
or docker cp
to a running container
git clone
, by default, for file symlinks it copies the data to both source and target files and for directory symlinks it creates empty files instead of a directory
git clone -c core.symlinks=true
recreates file and directory symlinks correctly but is not the default
tar.exe
creates tar but when extracted, the symlink is an empty file (same for ustar
, pax
formats)
mkdir foo
mklink /d foo\bar ..
# Symbolic link created for foo\bar <<===>> ..
dir foo\
# ...
# 05/13/2020 02:08 PM <SYMLINKD> bar [..]
# ...
dir foo\bar\
# <shows output>
tar cf foo.tar foo
rmdir /s /q foo
tar xf foo.tar
dir foo\
# ...
# 05/13/2020 02:03 PM 0 bar
# ...
dir foo\bar\
# File Not Found
git clone -c core.symlinks=true https://github.com/greenhouse-org/buildpacks-lifecycle.git