mirror of
https://github.com/containers/podman.git
synced 2025-06-18 15:39:08 +08:00
Merge pull request #4772 from boaz0/closes_4628
Add the rmi flag to podman-run to delete container image
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user