is there any way to determine whether or not a container will be removed on exit with a docker container inspect $id
command? Or any other docker command?
is there any way to determine whether or not a container will be removed on exit with a docker container inspect $id
command? Or any other docker command?
2
Answers
turns out the answer is yes, the particular field is
.HostConfig.AutoRemove
, so for example:The command provided by @Dave Ankin will output either
true
orfalse
. If it’strue
, the container will be automatically removed on exit. If it’sfalse
, the container will not be automatically removed.