Skip to content

Commit

Permalink
Merge pull request #19031 from dfr/freebsd-init
Browse files Browse the repository at this point in the history
pkg/specgen: add support for 'podman run --init' on FreeBSD
  • Loading branch information
openshift-merge-robot authored Jun 28, 2023
2 parents 455c7c8 + 865d77e commit f0cb8df
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions libpod/define/mount_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ const (
// TypeBind is the type for mounting host dir
TypeBind = "nullfs"
)

var (
// Mount potions for bind
BindOptions = []string{}
)
5 changes: 5 additions & 0 deletions libpod/define/mount_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ const (
// TypeBind is the type for mounting host dir
TypeBind = "bind"
)

var (
// Mount potions for bind
BindOptions = []string{"bind"}
)
2 changes: 1 addition & 1 deletion pkg/specgen/generate/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ func addContainerInitBinary(s *specgen.SpecGenerator, path string) (spec.Mount,
Destination: define.ContainerInitPath,
Type: define.TypeBind,
Source: path,
Options: []string{define.TypeBind, "ro"},
Options: append(define.BindOptions, "ro"),
}

if path == "" {
Expand Down

0 comments on commit f0cb8df

Please sign in to comment.