summaryrefslogtreecommitdiff
path: root/libpod/container.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-18 18:27:33 +0100
committerGitHub <noreply@github.com>2020-03-18 18:27:33 +0100
commit45e7cbfef65d0379af19264c5fa90e1ae9ccb74a (patch)
tree213fbf640875883d598cff217b933b3c413c5707 /libpod/container.go
parentd9eb078e2a1cff73461f285924ab1ab8699e9bca (diff)
parentf4e873c4e10502dd0a7fb14cc2fd87b12760a318 (diff)
downloadpodman-45e7cbfef65d0379af19264c5fa90e1ae9ccb74a.tar.gz
podman-45e7cbfef65d0379af19264c5fa90e1ae9ccb74a.tar.bz2
podman-45e7cbfef65d0379af19264c5fa90e1ae9ccb74a.zip
Merge pull request #5480 from vrothberg/auto-updates
auto update containers in systemd units
Diffstat (limited to 'libpod/container.go')
-rw-r--r--libpod/container.go14
1 files changed, 13 insertions, 1 deletions
diff --git a/libpod/container.go b/libpod/container.go
index dbd15e55f..d83de93bb 100644
--- a/libpod/container.go
+++ b/libpod/container.go
@@ -239,6 +239,12 @@ type ContainerConfig struct {
// container has been created with.
CreateCommand []string `json:"CreateCommand,omitempty"`
+ // RawImageName is the raw and unprocessed name of the image when creating
+ // the container (as specified by the user). May or may not be set. One
+ // use case to store this data are auto-updates where we need the _exact_
+ // name and not some normalized instance of it.
+ RawImageName string `json:"RawImageName,omitempty"`
+
// TODO consider breaking these subsections up into smaller structs
// UID/GID mappings used by the storage
@@ -503,11 +509,17 @@ func (c *Container) Namespace() string {
return c.config.Namespace
}
-// Image returns the ID and name of the image used as the container's rootfs
+// Image returns the ID and name of the image used as the container's rootfs.
func (c *Container) Image() (string, string) {
return c.config.RootfsImageID, c.config.RootfsImageName
}
+// RawImageName returns the unprocessed and not-normalized user-specified image
+// name.
+func (c *Container) RawImageName() string {
+ return c.config.RawImageName
+}
+
// ShmDir returns the sources path to be mounted on /dev/shm in container
func (c *Container) ShmDir() string {
return c.config.ShmDir