Merge pull request #14281 from vrothberg/fix-14251

fix --init with /dev bind mount
This commit is contained in:
OpenShift Merge Robot
2022-05-23 10:17:59 -04:00
committed by GitHub
7 changed files with 26 additions and 19 deletions

View File

@ -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"
)

View File

@ -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