Skip to content

docker cp -a docs incorrect #17533

Open
Open
@cspotcode

Description

@cspotcode

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions