diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2018-08-16 16:23:09 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-08-17 11:40:46 +0000 |
commit | 57e1600315c3b4657797d2605cc69d7343da034f (patch) | |
tree | 93b75a75abd830dba091d82f17d87463b4d549fb /vendor/github.com/openshift/imagebuilder/dispatchers.go | |
parent | 89a9750b6dd55b6d647d43942c6f97c9e1bb4029 (diff) | |
download | podman-57e1600315c3b4657797d2605cc69d7343da034f.tar.gz podman-57e1600315c3b4657797d2605cc69d7343da034f.tar.bz2 podman-57e1600315c3b4657797d2605cc69d7343da034f.zip |
Vendor in latest buildah and imagebuilder
We want to add the latest support for COPY --chown UID:GID.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Closes: #1289
Approved by: TomSweeneyRedHat
Diffstat (limited to 'vendor/github.com/openshift/imagebuilder/dispatchers.go')
-rw-r--r-- | vendor/github.com/openshift/imagebuilder/dispatchers.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vendor/github.com/openshift/imagebuilder/dispatchers.go b/vendor/github.com/openshift/imagebuilder/dispatchers.go index afa04bb89..068d5cc6f 100644 --- a/vendor/github.com/openshift/imagebuilder/dispatchers.go +++ b/vendor/github.com/openshift/imagebuilder/dispatchers.go @@ -149,18 +149,21 @@ func dispatchCopy(b *Builder, args []string, attributes map[string]bool, flagArg } last := len(args) - 1 dest := makeAbsolute(args[last], b.RunConfig.WorkingDir) + var chown string var from string if len(flagArgs) > 0 { for _, arg := range flagArgs { switch { + case strings.HasPrefix(arg, "--chown="): + chown = strings.TrimPrefix(arg, "--chown=") case strings.HasPrefix(arg, "--from="): from = strings.TrimPrefix(arg, "--from=") default: - return fmt.Errorf("COPY only supports the --from=<image|stage> flag") + return fmt.Errorf("COPY only supports the --chown=<uid:gid> and the --from=<image|stage> flags") } } } - b.PendingCopies = append(b.PendingCopies, Copy{From: from, Src: args[0:last], Dest: dest, Download: false}) + b.PendingCopies = append(b.PendingCopies, Copy{From: from, Src: args[0:last], Dest: dest, Download: false, Chown: chown}) return nil } |