Fix incorrect documentation for docker cp -a flag#6895
Open
zozo123 wants to merge 1 commit intodocker:masterfrom
Open
Fix incorrect documentation for docker cp -a flag#6895zozo123 wants to merge 1 commit intodocker:masterfrom
docker cp -a flag#6895zozo123 wants to merge 1 commit intodocker:masterfrom
Conversation
The `-a` (`--archive`) flag description claimed "Archive mode (copy all uid/gid information)" which is misleading. In practice: - Without `-a` (default): `docker cp` preserves ownership (uid/gid) from the source - With `-a`: ownership is set to match the container user (as configured with `--user`) The old documentation described the opposite of the actual behavior, as reported in docker#6870. Updated the flag description in the Go source, markdown docs, and fish shell completions to accurately reflect the behavior. Closes docker#6870
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
-a(--archive) flag description fordocker cpwhich incorrectly stated "Archive mode (copy all uid/gid information)"container_cp.mdwhich incorrectly described the default and-abehaviorsProblem
The documentation claimed
-ameans "copy all uid/gid information", implying it preserves original uid/gid. In practice:-a(default):docker cpalready preserves ownership (uid/gid) from the source-a: ownership is changed to match the container user (as configured with--user)The old docs described the opposite of what actually happens. See also moby/moby#34096 for the related behavior discussion.
Changes
cli/command/container/cp.godocs/reference/commandline/cp.mddocs/reference/commandline/container_cp.mdcontrib/completion/fish/docker.fishTest plan
Closes #6870