Skip to content

docker cp -a docs incorrect #6870

Description

@cspotcode

Description

Is this a docs issue?

  • 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

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions