summaryrefslogtreecommitdiff
path: root/libpod/define
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-01-14 14:33:01 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2022-01-17 06:48:54 -0500
commit10d969ff1a15e8f53eb5a2fa7eb8cfb321609b55 (patch)
treefe5be3f9cd57047c393193d467457fcebd1a506a /libpod/define
parentea2656dc8658f99a0e9be2342557763e974513b9 (diff)
downloadpodman-10d969ff1a15e8f53eb5a2fa7eb8cfb321609b55.tar.gz
podman-10d969ff1a15e8f53eb5a2fa7eb8cfb321609b55.tar.bz2
podman-10d969ff1a15e8f53eb5a2fa7eb8cfb321609b55.zip
Use PODMAN_USERNS environment variable when running as a service
Fixes: https://github.com/containers/podman/issues/11350#issuecomment-1011562526 Also add inspect information about the idmappings if they exists. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'libpod/define')
-rw-r--r--libpod/define/container_inspect.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/libpod/define/container_inspect.go b/libpod/define/container_inspect.go
index ba73e4196..a61f9e615 100644
--- a/libpod/define/container_inspect.go
+++ b/libpod/define/container_inspect.go
@@ -6,6 +6,11 @@ import (
"github.com/containers/image/v5/manifest"
)
+type InspectIDMappings struct {
+ UIDMap []string `json:"UidMap"`
+ GIDMap []string `json:"GidMap"`
+}
+
// InspectContainerConfig holds further data about how a container was initially
// configured.
type InspectContainerConfig struct {
@@ -401,7 +406,10 @@ type InspectContainerHostConfig struct {
// TODO Rootless has an additional 'keep-id' option, presently not
// reflected here.
UsernsMode string `json:"UsernsMode"`
+ // IDMappings is the UIDMapping and GIDMapping used within the container
+ IDMappings *InspectIDMappings `json:"IDMappings,omitempty"`
// ShmSize is the size of the container's SHM device.
+
ShmSize int64 `json:"ShmSize"`
// Runtime is provided purely for Docker compatibility.
// It is set unconditionally to "oci" as Podman does not presently