summaryrefslogtreecommitdiff
path: root/pkg/spec/createconfig.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-04 10:58:10 -0500
committerGitHub <noreply@github.com>2020-03-04 10:58:10 -0500
commit90eef95cb1591f20f5716225cf9b2c8c415fc3fc (patch)
tree9f19d9affffb9c57b5888e2fb3d12b9c642d4a73 /pkg/spec/createconfig.go
parenta8bc423e2989ceff1ee2ca79d6c1bd8314901e11 (diff)
parent11e5c53d1191f7a324f212aa2ca2ec2aad1b4676 (diff)
downloadpodman-90eef95cb1591f20f5716225cf9b2c8c415fc3fc.tar.gz
podman-90eef95cb1591f20f5716225cf9b2c8c415fc3fc.tar.bz2
podman-90eef95cb1591f20f5716225cf9b2c8c415fc3fc.zip
Merge pull request #4772 from boaz0/closes_4628
Add the rmi flag to podman-run to delete container image
Diffstat (limited to 'pkg/spec/createconfig.go')
-rw-r--r--pkg/spec/createconfig.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/spec/createconfig.go b/pkg/spec/createconfig.go
index 1d9633bb3..9b2255d61 100644
--- a/pkg/spec/createconfig.go
+++ b/pkg/spec/createconfig.go
@@ -157,6 +157,7 @@ type CreateConfig struct {
Resources CreateResourceConfig
RestartPolicy string
Rm bool //rm
+ Rmi bool //rmi
StopSignal syscall.Signal // stop-signal
StopTimeout uint // stop-timeout
Systemd bool
@@ -234,6 +235,10 @@ func (c *CreateConfig) createExitCommand(runtime *libpod.Runtime) ([]string, err
command = append(command, "--rm")
}
+ if c.Rmi {
+ command = append(command, "--rmi")
+ }
+
return command, nil
}