Here is a one line reproducer of the problem with overlay2
docker run --user root -ti --rm centos:7 /bin/bash -c "cd /root ; rm -f /etc/yum.conf ; cp -a /etc/* ~/ ; echo $?"
cp: cannot stat '/etc/yum.conf': No such file or directory 1
Here is a one line reproducer of the problem with overlay2
docker run --user root -ti --rm centos:7 /bin/bash -c "cd /root ; rm -f /etc/yum.conf ; cp -a /etc/* ~/ ; echo $?"
cp: cannot stat '/etc/yum.conf': No such file or directory
1