You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
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.
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.
Verdict: UPSTREAM — The docker cp CLI reference is generated from data/cli/engine/docker_container_cp.yaml, which is vendored from the docker/cli repository; any documentation fix must go to that upstream repo.
There hasn't been any activity on this issue for a long time. If the problem is still relevant, add a comment to keep it open. Otherwise, this issue will be automatically closed in 14 days.
To remove the stale label: Comment /lifecycle active To freeze (requires write access): Comment /lifecycle frozen
Activity
thaJeztah commentedon Jun 12, 2023
cspotcode commentedon Jun 12, 2023
A user would intuitively expect docker cp's
--archiveflag to enable something similar to Unix'scp -abut, in fact, it disables a behavior ofcp -a.What is the intended, bug-free behavior? Docker cp preserves everything except ownership, and
-aenables ownership preservation? This meansdocker cpis not quite like unixcpnorcp -adocker-robot commentedon Sep 10, 2023
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 stalecomment.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 frozencomment./lifecycle stale
cspotcode commentedon Sep 10, 2023
/remove-lifecycle stale
docker-robot commentedon Dec 9, 2023
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 stalecomment.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 frozencomment./lifecycle stale
cspotcode commentedon Dec 9, 2023
/remove-lifecycle stale
docker-robot commentedon Mar 15, 2024
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 stalecomment.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 frozencomment./lifecycle stale
cspotcode commentedon Mar 15, 2024
/remove-lifecycle stale
15 remaining items
cspotcode commentedon Mar 10, 2025
docker-robot commentedon Jun 8, 2025
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 stalecomment.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 frozencomment./lifecycle stale
cspotcode commentedon Jun 8, 2025
dvdksn commentedon Mar 19, 2026
Verdict: UPSTREAM — The
docker cpCLI reference is generated fromdata/cli/engine/docker_container_cp.yaml, which is vendored from the docker/cli repository; any documentation fix must go to that upstream repo.cspotcode commentedon Mar 19, 2026
I've filed this issue on docker/cli: docker/cli#6870
github-actions commentedon Sep 16, 2026
There hasn't been any activity on this issue for a long time. If the problem is still relevant, add a comment to keep it open. Otherwise, this issue will be automatically closed in 14 days.
To remove the stale label: Comment
/lifecycle activeTo freeze (requires write access): Comment
/lifecycle frozencspotcode commentedon Sep 16, 2026
/lifecycle active