mirror of
https://github.com/bingohuang/docker-labs.git
synced 2025-07-13 17:42:53 +08:00
Autoremove container upon exit
This commit is contained in:
parent
712f019ffb
commit
d497c5f05b
@ -202,7 +202,7 @@ func ResizeConnection(name string, cols, rows uint) error {
|
||||
}
|
||||
|
||||
func CreateInstance(session *Session, dindImage string) (*Instance, error) {
|
||||
h := &container.HostConfig{NetworkMode: container.NetworkMode(session.Id), Privileged: true}
|
||||
h := &container.HostConfig{NetworkMode: container.NetworkMode(session.Id), Privileged: true, AutoRemove: true}
|
||||
|
||||
if os.Getenv("APPARMOR_PROFILE") != "" {
|
||||
h.SecurityOpt = []string{fmt.Sprintf("apparmor=%s", os.Getenv("APPARMOR_PROFILE"))}
|
||||
|
Loading…
x
Reference in New Issue
Block a user