`docker cp -a` docs incorrect
Is this a docs issue?
- [X] My issue is about the documentation content or website
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
- I think this relates to a bug; see https://github.com/moby/moby/issues/34096
A user would intuitively expect docker cp's --archive flag to enable something similar to Unix's cp -a but, in fact, it disables a behavior of cp -a.
What is the intended, bug-free behavior? Docker cp preserves everything except ownership, and -a enables ownership preservation? This means docker cp is not quite like unix cp nor cp -a
There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment.
If not, this issue will be closed in 14 days. This helps our maintainers focus on the active issues.
Prevent issues from auto-closing with a /lifecycle frozen comment.
/lifecycle stale
/remove-lifecycle stale
There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment.
If not, this issue will be closed in 14 days. This helps our maintainers focus on the active issues.
Prevent issues from auto-closing with a /lifecycle frozen comment.
/lifecycle stale
/remove-lifecycle stale
There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment.
If not, this issue will be closed in 14 days. This helps our maintainers focus on the active issues.
Prevent issues from auto-closing with a /lifecycle frozen comment.
/lifecycle stale
/remove-lifecycle stale