summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-05-23 10:17:59 -0400
committerGitHub <noreply@github.com>2022-05-23 10:17:59 -0400
commit7d00b0ea0d0c53ddba8d6aebdbce2f167aceccc5 (patch)
tree2c37b0bf4e687954b8d8f82dcf8e3021ec6fdedc /libpod
parentbe255287c929999ff018d0b8319e644b4ea77064 (diff)
parent633d5f1f8b8844d6e2fb3e2593768360c889ed76 (diff)
downloadpodman-7d00b0ea0d0c53ddba8d6aebdbce2f167aceccc5.tar.gz
podman-7d00b0ea0d0c53ddba8d6aebdbce2f167aceccc5.tar.bz2
podman-7d00b0ea0d0c53ddba8d6aebdbce2f167aceccc5.zip
Merge pull request #14281 from vrothberg/fix-14251
fix --init with /dev bind mount
Diffstat (limited to 'libpod')
-rw-r--r--libpod/define/container.go2
-rw-r--r--libpod/diff.go23
2 files changed, 14 insertions, 11 deletions
diff --git a/libpod/define/container.go b/libpod/define/container.go
index bb44a6a4a..ba939578f 100644
--- a/libpod/define/container.go
+++ b/libpod/define/container.go
@@ -35,4 +35,6 @@ const (
// OneShotInitContainer is a container that only runs as init once
// and is then deleted.
OneShotInitContainer = "once"
+ // ContainerInitPath is the default path of the mounted container init.
+ ContainerInitPath = "/run/podman-init"
)
diff --git a/libpod/diff.go b/libpod/diff.go
index 794b26b48..86fa063ec 100644
--- a/libpod/diff.go
+++ b/libpod/diff.go
@@ -8,17 +8,18 @@ import (
)
var initInodes = map[string]bool{
- "/dev": true,
- "/etc/hostname": true,
- "/etc/hosts": true,
- "/etc/resolv.conf": true,
- "/proc": true,
- "/run": true,
- "/run/notify": true,
- "/run/.containerenv": true,
- "/run/secrets": true,
- "/sys": true,
- "/etc/mtab": true,
+ "/dev": true,
+ "/etc/hostname": true,
+ "/etc/hosts": true,
+ "/etc/resolv.conf": true,
+ "/proc": true,
+ "/run": true,
+ "/run/notify": true,
+ "/run/.containerenv": true,
+ "/run/secrets": true,
+ define.ContainerInitPath: true,
+ "/sys": true,
+ "/etc/mtab": true,
}
// GetDiff returns the differences between the two images, layers, or containers