Sitelet https://github.com/testcontainers/testcontainers-node/issues/605
Skip to content

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

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

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

    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