summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-04-02 10:25:27 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-05-03 10:36:16 -0400
commit948fb5ee64e1be8ad4ec5a748059fa45e73e2fe1 (patch)
tree3af27fc3d87abf7fc3e57e4c9e660c50b48598c8 /cmd
parent7ba1b609aad678f458951c978455ea44c5b4d3ec (diff)
downloadpodman-948fb5ee64e1be8ad4ec5a748059fa45e73e2fe1.tar.gz
podman-948fb5ee64e1be8ad4ec5a748059fa45e73e2fe1.tar.bz2
podman-948fb5ee64e1be8ad4ec5a748059fa45e73e2fe1.zip
Restart policy conflicts with the --rm flag
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/shared/create.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go
index 1ef852cd2..d2bd23e3e 100644
--- a/cmd/podman/shared/create.go
+++ b/cmd/podman/shared/create.go
@@ -41,6 +41,9 @@ func CreateContainer(ctx context.Context, c *GenericCLIResults, runtime *libpod.
span, _ := opentracing.StartSpanFromContext(ctx, "createContainer")
defer span.Finish()
}
+ if c.Bool("rm") && c.String("restart") != "" && c.String("restart") != "no" {
+ return nil, nil, errors.Errorf("the --rm flag conflicts with --restart")
+ }
rtc, err := runtime.GetConfig()
if err != nil {