Description
Is this a docs issue?
Type of issue
Information is incorrect
Description
Docs for docker cp -a claim that -a will "Archive mode (copy all uid/gid information)"
My testing shows that this is incorrect.
It appears that docker cp . container-name:/ without the -a flag will preserve ownership of the copied files. That is, a file owned by user ID 1234 on the host will be created with user ID 1234 within the container.
Adding the -a flag will instead change the ownership of copied files to match the --user of the container.
Location
https://docs.docker.com/engine/reference/commandline/cp/
Suggestion
No response
Reproduce
Expected behavior
No response
docker version
docker info
Additional Info
Re-posted here per this comment on the original docker/docs issue: docker/docs#17533 (comment)
Description
Is this a docs issue?
Type of issue
Information is incorrect
Description
Docs for
docker cp -aclaim that-awill "Archive mode (copy all uid/gid information)"My testing shows that this is incorrect.
It appears that
docker cp . container-name:/without the-aflag will preserve ownership of the copied files. That is, a file owned by user ID 1234 on the host will be created with user ID 1234 within the container.Adding the
-aflag will instead change the ownership of copied files to match the--userof the container.Location
https://docs.docker.com/engine/reference/commandline/cp/
Suggestion
No response
Reproduce
Expected behavior
No response
docker version
docker info
Additional Info
Re-posted here per this comment on the original docker/docs issue: docker/docs#17533 (comment)