summaryrefslogtreecommitdiff
path: root/cmd/podmanV2/registry
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-03-19 16:50:15 -0500
committerBrent Baude <bbaude@redhat.com>2020-03-20 12:54:45 -0500
commit87293028e61d0c88c258ed9f4a82c4be7f0bc896 (patch)
treecd3c6f35eed940e41afed71e7f60f7a8abac1612 /cmd/podmanV2/registry
parentccc30c606e843d5c98e2c62a3b393a61e60976b2 (diff)
downloadpodman-87293028e61d0c88c258ed9f4a82c4be7f0bc896.tar.gz
podman-87293028e61d0c88c258ed9f4a82c4be7f0bc896.tar.bz2
podman-87293028e61d0c88c258ed9f4a82c4be7f0bc896.zip
podmanv2 container exists|wait
enable container exists and wait for podmanv2 Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podmanV2/registry')
-rw-r--r--cmd/podmanV2/registry/registry.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/cmd/podmanV2/registry/registry.go b/cmd/podmanV2/registry/registry.go
index fa51d6535..793d520a8 100644
--- a/cmd/podmanV2/registry/registry.go
+++ b/cmd/podmanV2/registry/registry.go
@@ -14,11 +14,13 @@ type CliCommand struct {
}
var (
- Commands []CliCommand
- GlobalFlags entities.EngineFlags
+ Commands []CliCommand
+
imageEngine entities.ImageEngine
containerEngine entities.ContainerEngine
- PodmanTunnel bool
+
+ EngineOpts entities.EngineOptions
+ GlobalFlags entities.EngineFlags
)
// HelpTemplate returns the help template for podman commands
@@ -63,7 +65,8 @@ func ImageEngine() entities.ImageEngine {
// NewImageEngine is a wrapper for building an ImageEngine to be used for PreRunE functions
func NewImageEngine(cmd *cobra.Command, args []string) (entities.ImageEngine, error) {
if imageEngine == nil {
- engine, err := infra.NewImageEngine(GlobalFlags.EngineMode, entities.EngineOptions{})
+ EngineOpts.FlagSet = cmd.Flags()
+ engine, err := infra.NewImageEngine(EngineOpts)
if err != nil {
return nil, err
}
@@ -79,7 +82,8 @@ func ContainerEngine() entities.ContainerEngine {
// NewContainerEngine is a wrapper for building an ContainerEngine to be used for PreRunE functions
func NewContainerEngine(cmd *cobra.Command, args []string) (entities.ContainerEngine, error) {
if containerEngine == nil {
- engine, err := infra.NewContainerEngine(GlobalFlags.EngineMode, entities.EngineOptions{})
+ EngineOpts.FlagSet = cmd.Flags()
+ engine, err := infra.NewContainerEngine(EngineOpts)
if err != nil {
return nil, err
}