diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-10-28 19:59:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-28 19:59:35 +0100 |
commit | 1b5c2d14409c4fb5d83fff77d4a17f0dcfe9e04e (patch) | |
tree | 4e435e79a9198d802a3bc6267d18b99b80c13fb1 /libpod/container.go | |
parent | 49bd51e12f3aa8f2f711832d1dc4134861ee29c8 (diff) | |
parent | 5f8bf3d07d94d58465dfa494f7720ca23b8d4c6f (diff) | |
download | podman-1b5c2d14409c4fb5d83fff77d4a17f0dcfe9e04e.tar.gz podman-1b5c2d14409c4fb5d83fff77d4a17f0dcfe9e04e.tar.bz2 podman-1b5c2d14409c4fb5d83fff77d4a17f0dcfe9e04e.zip |
Merge pull request #4355 from mheon/ensure_state
Add ensureState helper for checking container state
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 +} |