diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-06-26 02:36:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-26 02:36:06 +0200 |
commit | c9078936dd1bf5bdb59066eb1bdd179ac58f98e1 (patch) | |
tree | a8d769074e3ba43e100341c974639166c46ca5eb /cmd/podman/commit.go | |
parent | fbf5e80337c6399aa54c8ea1bc316eddb369ab0b (diff) | |
parent | dd81a44ccfa34585ef62319835c8bb421db9e334 (diff) | |
download | podman-c9078936dd1bf5bdb59066eb1bdd179ac58f98e1.tar.gz podman-c9078936dd1bf5bdb59066eb1bdd179ac58f98e1.tar.bz2 podman-c9078936dd1bf5bdb59066eb1bdd179ac58f98e1.zip |
Merge pull request #3419 from baude/removelibpodfrommainphase1
remove libpod from main
Diffstat (limited to 'cmd/podman/commit.go')
-rw-r--r-- | cmd/podman/commit.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/podman/commit.go b/cmd/podman/commit.go index db0b8241e..c49645a1d 100644 --- a/cmd/podman/commit.go +++ b/cmd/podman/commit.go @@ -5,7 +5,6 @@ import ( "strings" "github.com/containers/libpod/cmd/podman/cliconfig" - "github.com/containers/libpod/libpod" "github.com/containers/libpod/pkg/adapter" "github.com/containers/libpod/pkg/util" "github.com/pkg/errors" @@ -30,6 +29,9 @@ var ( podman commit -q --author "firstName lastName" reverent_golick image-committed podman commit -q --pause=false containerID image-committed`, } + + // ChangeCmds is the list of valid Changes commands to passed to the Commit call + ChangeCmds = []string{"CMD", "ENTRYPOINT", "ENV", "EXPOSE", "LABEL", "ONBUILD", "STOPSIGNAL", "USER", "VOLUME", "WORKDIR"} ) func init() { @@ -37,7 +39,7 @@ func init() { commitCommand.SetHelpTemplate(HelpTemplate()) commitCommand.SetUsageTemplate(UsageTemplate()) flags := commitCommand.Flags() - flags.StringArrayVarP(&commitCommand.Change, "change", "c", []string{}, fmt.Sprintf("Apply the following possible instructions to the created image (default []): %s", strings.Join(libpod.ChangeCmds, " | "))) + flags.StringArrayVarP(&commitCommand.Change, "change", "c", []string{}, fmt.Sprintf("Apply the following possible instructions to the created image (default []): %s", strings.Join(ChangeCmds, " | "))) flags.StringVarP(&commitCommand.Format, "format", "f", "oci", "`Format` of the image manifest and metadata") flags.StringVarP(&commitCommand.Message, "message", "m", "", "Set commit message for imported image") flags.StringVarP(&commitCommand.Author, "author", "a", "", "Set the author for the image committed") @@ -66,7 +68,7 @@ func commitCmd(c *cliconfig.CommitValues) error { if len(splitChange) == 1 { splitChange = strings.Split(strings.ToUpper(change), " ") } - if !util.StringInSlice(splitChange[0], libpod.ChangeCmds) { + if !util.StringInSlice(splitChange[0], ChangeCmds) { return errors.Errorf("invalid syntax for --change: %s", change) } } |