Merge pull request #19031 from dfr/freebsd-init

pkg/specgen: add support for 'podman run --init' on FreeBSD
This commit is contained in:
OpenShift Merge Robot
2023-06-28 22:57:07 +02:00
committed by GitHub
3 changed files with 11 additions and 1 deletions

View File

@ -6,3 +6,8 @@ const (
// TypeBind is the type for mounting host dir // TypeBind is the type for mounting host dir
TypeBind = "nullfs" TypeBind = "nullfs"
) )
var (
// Mount potions for bind
BindOptions = []string{}
)

View File

@ -6,3 +6,8 @@ const (
// TypeBind is the type for mounting host dir // TypeBind is the type for mounting host dir
TypeBind = "bind" TypeBind = "bind"
) )
var (
// Mount potions for bind
BindOptions = []string{"bind"}
)

View File

@ -363,7 +363,7 @@ func addContainerInitBinary(s *specgen.SpecGenerator, path string) (spec.Mount,
Destination: define.ContainerInitPath, Destination: define.ContainerInitPath,
Type: define.TypeBind, Type: define.TypeBind,
Source: path, Source: path,
Options: []string{define.TypeBind, "ro"}, Options: append(define.BindOptions, "ro"),
} }
if path == "" { if path == "" {