summaryrefslogtreecommitdiff
path: root/cmd/podman/pod_create.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-06-27 16:01:45 +0200
committerGitHub <noreply@github.com>2019-06-27 16:01:45 +0200
commit0906b32087c3d7db6844873a7d46241430a1b065 (patch)
tree3c68a0c2d6e2e5742b4cc314136ddb8e9877ec75 /cmd/podman/pod_create.go
parent5e3d63a53c0762c99c5eb7863ef7fc8d0b2e8eec (diff)
parent8561b996447793999a6465f9b9e3f0f7bbea2c6a (diff)
downloadpodman-0906b32087c3d7db6844873a7d46241430a1b065.tar.gz
podman-0906b32087c3d7db6844873a7d46241430a1b065.tar.bz2
podman-0906b32087c3d7db6844873a7d46241430a1b065.zip
Merge pull request #3442 from baude/removelibpodfrommainphase2
libpod removal from main (phase 2)
Diffstat (limited to 'cmd/podman/pod_create.go')
-rw-r--r--cmd/podman/pod_create.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/cmd/podman/pod_create.go b/cmd/podman/pod_create.go
index c891f2c7b..0abf84756 100644
--- a/cmd/podman/pod_create.go
+++ b/cmd/podman/pod_create.go
@@ -6,8 +6,9 @@ import (
"github.com/containers/libpod/cmd/podman/cliconfig"
"github.com/containers/libpod/cmd/podman/shared"
- "github.com/containers/libpod/libpod"
+ "github.com/containers/libpod/libpod/define"
"github.com/containers/libpod/pkg/adapter"
+ "github.com/containers/libpod/pkg/util"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
@@ -45,8 +46,8 @@ func init() {
flags.StringVar(&podCreateCommand.CgroupParent, "cgroup-parent", "", "Set parent cgroup for the pod")
flags.BoolVar(&podCreateCommand.Infra, "infra", true, "Create an infra container associated with the pod to share namespaces with")
- flags.StringVar(&podCreateCommand.InfraImage, "infra-image", libpod.DefaultInfraImage, "The image of the infra container to associate with the pod")
- flags.StringVar(&podCreateCommand.InfraCommand, "infra-command", libpod.DefaultInfraCommand, "The command to run on the infra container when the pod is started")
+ flags.StringVar(&podCreateCommand.InfraImage, "infra-image", define.DefaultInfraImage, "The image of the infra container to associate with the pod")
+ flags.StringVar(&podCreateCommand.InfraCommand, "infra-command", define.DefaultInfraCommand, "The command to run on the infra container when the pod is started")
flags.StringSliceVar(&podCreateCommand.LabelFile, "label-file", []string{}, "Read in a line delimited file of labels")
flags.StringSliceVarP(&podCreateCommand.Labels, "label", "l", []string{}, "Set metadata on pod (default [])")
flags.StringVarP(&podCreateCommand.Name, "name", "n", "", "Assign a name to the pod")
@@ -78,7 +79,7 @@ func podCreateCmd(c *cliconfig.PodCreateValues) error {
return errors.Errorf("You cannot share kernel namespaces on the pod level without an infra container")
}
if c.Flag("pod-id-file").Changed && os.Geteuid() == 0 {
- podIdFile, err = libpod.OpenExclusiveFile(c.PodIDFile)
+ podIdFile, err = util.OpenExclusiveFile(c.PodIDFile)
if err != nil && os.IsExist(err) {
return errors.Errorf("pod id file exists. Ensure another pod is not using it or delete %s", c.PodIDFile)
}