summaryrefslogtreecommitdiff
path: root/cmd/podman/shared
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-03-27 10:49:42 -0700
committerGitHub <noreply@github.com>2019-03-27 10:49:42 -0700
commit340eeec1b654880f9d339c9ac2957bcaeaee6829 (patch)
tree4256daeae13e2de6145d3b5c5be5f1929e955bbc /cmd/podman/shared
parent1ff03ee9f5e72fd62ba8e798035fa43f8f18b6dd (diff)
parent0cd92eae65b31cdbaa19e3cccb0e3234196a6d17 (diff)
downloadpodman-340eeec1b654880f9d339c9ac2957bcaeaee6829.tar.gz
podman-340eeec1b654880f9d339c9ac2957bcaeaee6829.tar.bz2
podman-340eeec1b654880f9d339c9ac2957bcaeaee6829.zip
Merge pull request #2747 from mheon/dns_none
Add --dns=none
Diffstat (limited to 'cmd/podman/shared')
-rw-r--r--cmd/podman/shared/create.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go
index 5ce0b8865..5f7263cb6 100644
--- a/cmd/podman/shared/create.go
+++ b/cmd/podman/shared/create.go
@@ -357,6 +357,10 @@ func ParseCreateOpts(ctx context.Context, c *cliconfig.PodmanCommand, runtime *l
return nil, errors.Errorf("--cpu-quota and --cpus cannot be set together")
}
+ if c.Bool("no-hosts") && c.Flag("add-host").Changed {
+ return nil, errors.Errorf("--no-hosts and --add-host cannot be set together")
+ }
+
// EXPOSED PORTS
var portBindings map[nat.Port][]nat.PortBinding
if data != nil {
@@ -646,6 +650,7 @@ func ParseCreateOpts(ctx context.Context, c *cliconfig.PodmanCommand, runtime *l
GroupAdd: c.StringSlice("group-add"),
Hostname: c.String("hostname"),
HostAdd: c.StringSlice("add-host"),
+ NoHosts: c.Bool("no-hosts"),
IDMappings: idmappings,
Image: imageName,
ImageID: imageID,