docker-convenience-scripts
docker-convenience-scripts copied to clipboard
change cp with tar
trafficstars
tar is more proper tool for files cloning - it preserves owners, permissions, works better with tons of small files
The cp -a also preserves these attributes.
added justification: docker engine uses tar https://docs.docker.com/engine/reference/commandline/export/ and tar is faster than cp https://superuser.com/a/985080
take care. cp -a of busybox (which is in alpine base image) does not preserve hard links.