summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/shared/create.go10
-rw-r--r--cmd/podman/shared/intermediate.go1
2 files changed, 10 insertions, 1 deletions
diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go
index 8e356cbcb..84cba4b75 100644
--- a/cmd/podman/shared/create.go
+++ b/cmd/podman/shared/create.go
@@ -83,7 +83,7 @@ func CreateContainer(ctx context.Context, c *GenericCLIResults, runtime *libpod.
} else {
return nil, nil, errors.Errorf("error, no input arguments were provided")
}
- newImage, err := runtime.ImageRuntime().New(ctx, name, rtc.SignaturePolicyPath, GetAuthFile(""), writer, nil, image.SigningOptions{}, false, nil)
+ newImage, err := runtime.ImageRuntime().New(ctx, name, rtc.SignaturePolicyPath, GetAuthFile(c.String("authfile")), writer, nil, image.SigningOptions{}, false, nil)
if err != nil {
return nil, nil, err
}
@@ -627,8 +627,16 @@ func ParseCreateOpts(ctx context.Context, c *GenericCLIResults, runtime *libpod.
return nil, errors.Errorf("cannot pass additional search domains when also specifying '.'")
}
+ // Check for explicit dns-search domain of ''
+ if c.Changed("dns-search") && len(c.StringSlice("dns-search")) == 0 {
+ return nil, errors.Errorf("'' is not a valid domain")
+ }
+
// Validate domains are good
for _, dom := range c.StringSlice("dns-search") {
+ if dom == "." {
+ continue
+ }
if _, err := parse.ValidateDomain(dom); err != nil {
return nil, err
}
diff --git a/cmd/podman/shared/intermediate.go b/cmd/podman/shared/intermediate.go
index 4062ac48a..3479876b4 100644
--- a/cmd/podman/shared/intermediate.go
+++ b/cmd/podman/shared/intermediate.go
@@ -366,6 +366,7 @@ func NewIntermediateLayer(c *cliconfig.PodmanCommand, remote bool) GenericCLIRes
m["add-host"] = newCRStringSlice(c, "add-host")
m["annotation"] = newCRStringSlice(c, "annotation")
m["attach"] = newCRStringSlice(c, "attach")
+ m["authfile"] = newCRString(c, "authfile")
m["blkio-weight"] = newCRString(c, "blkio-weight")
m["blkio-weight-device"] = newCRStringSlice(c, "blkio-weight-device")
m["cap-add"] = newCRStringSlice(c, "cap-add")