docker-convenience-scripts icon indicating copy to clipboard operation
docker-convenience-scripts copied to clipboard

change cp with tar

Open auk opened this issue 5 years ago • 3 comments
trafficstars

tar is more proper tool for files cloning - it preserves owners, permissions, works better with tons of small files

auk avatar Mar 24 '20 03:03 auk

The cp -a also preserves these attributes.

felipecrs avatar Apr 30 '20 19:04 felipecrs

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

datocrats-org avatar Jun 30 '20 18:06 datocrats-org

take care. cp -a of busybox (which is in alpine base image) does not preserve hard links.

harmv avatar Feb 17 '23 07:02 harmv