diff options
Diffstat (limited to 'libpod/container.go')
-rw-r--r-- | libpod/container.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libpod/container.go b/libpod/container.go index 7be73b3c3..fc9ef0c86 100644 --- a/libpod/container.go +++ b/libpod/container.go @@ -1185,3 +1185,12 @@ func (c *Container) HasHealthCheck() bool { func (c *Container) HealthCheckConfig() *manifest.Schema2HealthConfig { return c.config.HealthCheckConfig } + +// AutoRemove indicates whether the container will be removed after it is executed +func (c *Container) AutoRemove() bool { + spec := c.config.Spec + if spec.Annotations == nil { + return false + } + return c.Spec().Annotations[InspectAnnotationAutoremove] == InspectResponseTrue +} |