mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-05 21:21:42 +00:00
automatically remove container via -rm
add AutoRemove to HostConfig add -rm flag to docker run add TestRunAutoRemove to test -rm docs: add -rm to commandline/command/run add hostConfig to container monitor make monitor destroy the container via -rm This adds support for automatically removing a container after it exits. The removal of the container is handled on the server side.
This commit is contained in:
+2
-1
@@ -174,7 +174,8 @@ func (runtime *Runtime) Register(container *Container) error {
|
||||
close(container.waitLock)
|
||||
} else if !nomonitor {
|
||||
container.allocateNetwork()
|
||||
go container.monitor()
|
||||
// hostConfig isn't needed here and can be nil
|
||||
go container.monitor(nil)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user