summaryrefslogtreecommitdiff
path: root/cmd/podman/pods
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/pods')
-rw-r--r--cmd/podman/pods/create.go5
-rw-r--r--cmd/podman/pods/inspect.go3
-rw-r--r--cmd/podman/pods/pod.go5
-rw-r--r--cmd/podman/pods/ps.go4
-rw-r--r--cmd/podman/pods/stop.go3
5 files changed, 10 insertions, 10 deletions
diff --git a/cmd/podman/pods/create.go b/cmd/podman/pods/create.go
index 63dab4707..647cf24b2 100644
--- a/cmd/podman/pods/create.go
+++ b/cmd/podman/pods/create.go
@@ -9,7 +9,6 @@ import (
"github.com/containers/libpod/cmd/podman/common"
"github.com/containers/libpod/cmd/podman/parse"
"github.com/containers/libpod/cmd/podman/registry"
- "github.com/containers/libpod/libpod/define"
"github.com/containers/libpod/pkg/domain/entities"
"github.com/containers/libpod/pkg/errorhandling"
"github.com/containers/libpod/pkg/specgen"
@@ -50,8 +49,8 @@ func init() {
flags.AddFlagSet(common.GetNetFlags())
flags.StringVar(&createOptions.CGroupParent, "cgroup-parent", "", "Set parent cgroup for the pod")
flags.BoolVar(&createOptions.Infra, "infra", true, "Create an infra container associated with the pod to share namespaces with")
- flags.StringVar(&createOptions.InfraImage, "infra-image", define.DefaultInfraImage, "The image of the infra container to associate with the pod")
- flags.StringVar(&createOptions.InfraCommand, "infra-command", define.DefaultInfraCommand, "The command to run on the infra container when the pod is started")
+ flags.StringVar(&createOptions.InfraImage, "infra-image", containerConfig.Engine.InfraImage, "The image of the infra container to associate with the pod")
+ flags.StringVar(&createOptions.InfraCommand, "infra-command", containerConfig.Engine.InfraCommand, "The command to run on the infra container when the pod is started")
flags.StringSliceVar(&labelFile, "label-file", []string{}, "Read in a line delimited file of labels")
flags.StringSliceVarP(&labels, "label", "l", []string{}, "Set metadata on pod (default [])")
flags.StringVarP(&createOptions.Name, "name", "n", "", "Assign a name to the pod")
diff --git a/cmd/podman/pods/inspect.go b/cmd/podman/pods/inspect.go
index 901ae50b2..1e333247b 100644
--- a/cmd/podman/pods/inspect.go
+++ b/cmd/podman/pods/inspect.go
@@ -6,7 +6,6 @@ import (
"github.com/containers/libpod/cmd/podman/registry"
"github.com/containers/libpod/pkg/domain/entities"
- jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
@@ -55,7 +54,7 @@ func inspect(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
- b, err := jsoniter.MarshalIndent(responses, "", " ")
+ b, err := json.MarshalIndent(responses, "", " ")
if err != nil {
return err
}
diff --git a/cmd/podman/pods/pod.go b/cmd/podman/pods/pod.go
index 1cac50e40..e86b8aba4 100644
--- a/cmd/podman/pods/pod.go
+++ b/cmd/podman/pods/pod.go
@@ -3,10 +3,14 @@ package pods
import (
"github.com/containers/libpod/cmd/podman/registry"
"github.com/containers/libpod/pkg/domain/entities"
+ "github.com/containers/libpod/pkg/util"
"github.com/spf13/cobra"
)
var (
+ // Pull in configured json library
+ json = registry.JsonLibrary()
+
// Command: podman _pod_
podCmd = &cobra.Command{
Use: "pod",
@@ -15,6 +19,7 @@ var (
TraverseChildren: true,
RunE: registry.SubCommandExists,
}
+ containerConfig = util.DefaultContainerConfig()
)
func init() {
diff --git a/cmd/podman/pods/ps.go b/cmd/podman/pods/ps.go
index 8cb7b6266..808980eff 100644
--- a/cmd/podman/pods/ps.go
+++ b/cmd/podman/pods/ps.go
@@ -2,7 +2,6 @@ package pods
import (
"context"
- "encoding/json"
"fmt"
"io"
"os"
@@ -11,10 +10,9 @@ import (
"text/template"
"time"
- "github.com/docker/go-units"
-
"github.com/containers/libpod/cmd/podman/registry"
"github.com/containers/libpod/pkg/domain/entities"
+ "github.com/docker/go-units"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
diff --git a/cmd/podman/pods/stop.go b/cmd/podman/pods/stop.go
index 683d9c00a..daf05d640 100644
--- a/cmd/podman/pods/stop.go
+++ b/cmd/podman/pods/stop.go
@@ -47,11 +47,10 @@ func init() {
flags.BoolVarP(&stopOptions.All, "all", "a", false, "Stop all running pods")
flags.BoolVarP(&stopOptions.Ignore, "ignore", "i", false, "Ignore errors when a specified pod is missing")
flags.BoolVarP(&stopOptions.Latest, "latest", "l", false, "Stop the latest pod podman is aware of")
- flags.UintVarP(&timeout, "time", "t", 0, "Seconds to wait for pod stop before killing the container")
+ flags.UintVarP(&timeout, "time", "t", containerConfig.Engine.StopTimeout, "Seconds to wait for pod stop before killing the container")
if registry.IsRemote() {
_ = flags.MarkHidden("latest")
_ = flags.MarkHidden("ignore")
-
}
flags.SetNormalizeFunc(utils.AliasFlags)
}