Skip to content

Commit

Permalink
Use --rm option when running a container non-daemon mode
Browse files Browse the repository at this point in the history
Using `--rm` make sure as soon as container exits, it will also be
removed so that `podman ps -a` doesn't have an entry for it.
  • Loading branch information
praveenkumar committed Nov 28, 2019
1 parent 8b3fe03 commit e7792b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/crc/machine/cert-renewal.go
Expand Up @@ -51,7 +51,7 @@ func (recoveryPod recoveryPod) Run(args ...string) (string, string, error) {
}

func (recoveryPod *recoveryPod) runPodCommand(cmd string) (string, error) {
podmanCmd := fmt.Sprintf("sudo podman run -it --network=host -v /etc/kubernetes/:/etc/kubernetes/:Z --entrypoint=/usr/bin/cluster-kube-apiserver-operator '%s'", recoveryPod.kaoImage)
podmanCmd := fmt.Sprintf("sudo podman run -it --rm --network=host -v /etc/kubernetes/:/etc/kubernetes/:Z --entrypoint=/usr/bin/cluster-kube-apiserver-operator '%s'", recoveryPod.kaoImage)
podmanCmd = podmanCmd + " " + cmd
return recoveryPod.sshRunner.Run(podmanCmd)
}
Expand Down

0 comments on commit e7792b8

Please sign in to comment.