Skip to content

COPY --from=foo bar.tgz ... #37112

@elibarzilay

Description

@elibarzilay

It looks like COPY does not untar files when they're coming from a
previous stage. It would be good if it would.

Use case: I'm trying to minimize an ubuntu image by creating a tgz with
some parts left out in one stage, then using the tgz in a scratch stage.
This is to avoid the problem of using COPY which loses ownership and
set[ug]id information. The thing is that I cannot use ADD since it
doesn't have a --from; I cannot use COPY since it won't unpack the
tgz; and I cannot copy and then unpack the tgz since there is no
/bin/sh so a RUN fails too (complaining that there is no /bin/sh).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/builderkind/enhancementEnhancements are not bugs or new features but can improve usability or performance.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions