Skip to content

Support copying files to a container with a given ownership #605

@cristianrgreco

Description

@cristianrgreco

The Docker API for copying an archive to a container has a flag CopyUIDGID.

You could therefore chown a file locally to whatever UID/GID required, and this ownership will be retained in the container. This simulates an equivalent of

COPY --chown=user:group myfile /path/in/container/myfile

# OR

COPY myfile /path/in/container/myfile
RUN chown user:group myfile

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions