aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/pods
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-09-15 14:45:55 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2022-09-16 06:14:35 -0400
commit21841dc381f252d447a00e2d4ca5082a5e80d0f7 (patch)
treec906f734036a8be65503699f1a8a0d1064b24dbd /cmd/podman/pods
parent4ba6ee306088a4d322fe28f292bf5d5c4d17b778 (diff)
downloadpodman-21841dc381f252d447a00e2d4ca5082a5e80d0f7.tar.gz
podman-21841dc381f252d447a00e2d4ca5082a5e80d0f7.tar.bz2
podman-21841dc381f252d447a00e2d4ca5082a5e80d0f7.zip
Default to --dns-option to match Docker and Buildah
[NO NEW TESTS NEEDED] Existing tests cover this. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/pods')
-rw-r--r--cmd/podman/pods/create.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/cmd/podman/pods/create.go b/cmd/podman/pods/create.go
index d30f4782a..1f8152f32 100644
--- a/cmd/podman/pods/create.go
+++ b/cmd/podman/pods/create.go
@@ -17,6 +17,7 @@ import (
"github.com/containers/podman/v4/cmd/podman/containers"
"github.com/containers/podman/v4/cmd/podman/parse"
"github.com/containers/podman/v4/cmd/podman/registry"
+ "github.com/containers/podman/v4/cmd/podman/utils"
"github.com/containers/podman/v4/libpod/define"
"github.com/containers/podman/v4/pkg/domain/entities"
"github.com/containers/podman/v4/pkg/errorhandling"
@@ -26,7 +27,6 @@ import (
"github.com/docker/docker/pkg/parsers"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
- "github.com/spf13/pflag"
)
var (
@@ -99,14 +99,7 @@ func init() {
shareParentFlagName := "share-parent"
flags.BoolVar(&shareParent, shareParentFlagName, true, "Set the pod's cgroup as the cgroup parent for all containers joining the pod")
- flags.SetNormalizeFunc(aliasNetworkFlag)
-}
-
-func aliasNetworkFlag(_ *pflag.FlagSet, name string) pflag.NormalizedName {
- if name == "net" {
- name = "network"
- }
- return pflag.NormalizedName(name)
+ flags.SetNormalizeFunc(utils.AliasFlags)
}
func create(cmd *cobra.Command, args []string) error {