summaryrefslogtreecommitdiff
path: root/cmd/podman/create.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/create.go')
-rw-r--r--cmd/podman/create.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/cmd/podman/create.go b/cmd/podman/create.go
index 216f171a8..868f90d54 100644
--- a/cmd/podman/create.go
+++ b/cmd/podman/create.go
@@ -646,11 +646,6 @@ func parseCreateOpts(ctx context.Context, c *cliconfig.PodmanCommand, runtime *l
if util.StringInSlice(".", c.StringSlice("dns-search")) && len(c.StringSlice("dns-search")) > 1 {
return nil, errors.Errorf("cannot pass additional search domains when also specifying '.'")
}
- if !netMode.IsPrivate() {
- if c.IsSet("dns-search") || c.IsSet("dns") || c.IsSet("dns-opt") {
- return nil, errors.Errorf("specifying DNS flags when network mode is shared with the host or another container is not allowed")
- }
- }
// Validate domains are good
for _, dom := range c.StringSlice("dns-search") {
@@ -868,6 +863,12 @@ func joinOrCreateRootlessUserNamespace(createConfig *cc.CreateConfig, runtime *l
if err != nil {
return false, -1, err
}
+ if pid == 0 {
+ if createConfig.Pod != "" {
+ continue
+ }
+ return false, -1, errors.Errorf("dependency container %s is not running", ctr.ID())
+ }
return rootless.JoinNS(uint(pid))
}
}