Skip to content

[feature request/propsal] add option --keep-ownership for ADD and COPY commands #2875

@Dexus

Description

@Dexus

Description

I would love to keep the ownership on ADD and COPY commands, that are copy my files from local and also from images.

Steps to reproduce the issue:

  1. create Dockerfile with ADD and/or COPY from you local storage (owned by 1123:1123)
  2. build it
  3. check the Ownership

Describe the results you received:

files are owned by root:root

Describe the results you expected:

I would expect to have a option ADD --keep-ownership /file /file or COPY --keep-ownership /file /file that keeps the ownership of my files, like 1123:1123 if my user has the UID and GID or the files if I run it as root.

** Additonal references: **
containers/buildah#3767
containers/buildah#4001
openshift/imagebuilder#227

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