mirror of
https://github.com/containers/podman.git
synced 2025-06-20 00:51:16 +08:00
Merge pull request #15582 from dfr/freebsd-bind
Add support for FreeBSD volume mounts in specgen
This commit is contained in:
@ -1,8 +1,6 @@
|
|||||||
package define
|
package define
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// TypeBind is the type for mounting host dir
|
|
||||||
TypeBind = "bind"
|
|
||||||
// TypeVolume is the type for named volumes
|
// TypeVolume is the type for named volumes
|
||||||
TypeVolume = "volume"
|
TypeVolume = "volume"
|
||||||
// TypeTmpfs is the type for mounting tmpfs
|
// TypeTmpfs is the type for mounting tmpfs
|
||||||
|
8
libpod/define/mount_freebsd.go
Normal file
8
libpod/define/mount_freebsd.go
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
//go:build freebsd
|
||||||
|
|
||||||
|
package define
|
||||||
|
|
||||||
|
const (
|
||||||
|
// TypeBind is the type for mounting host dir
|
||||||
|
TypeBind = "nullfs"
|
||||||
|
)
|
8
libpod/define/mount_linux.go
Normal file
8
libpod/define/mount_linux.go
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
//go:build linux
|
||||||
|
|
||||||
|
package define
|
||||||
|
|
||||||
|
const (
|
||||||
|
// TypeBind is the type for mounting host dir
|
||||||
|
TypeBind = "bind"
|
||||||
|
)
|
8
libpod/define/mount_unsupported.go
Normal file
8
libpod/define/mount_unsupported.go
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
//go:build !linux && !freebsd
|
||||||
|
|
||||||
|
package define
|
||||||
|
|
||||||
|
const (
|
||||||
|
// TypeBind is the type for mounting host dir
|
||||||
|
TypeBind = "bind"
|
||||||
|
)
|
@ -7,6 +7,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/containers/common/pkg/parse"
|
"github.com/containers/common/pkg/parse"
|
||||||
|
"github.com/containers/podman/v4/libpod/define"
|
||||||
spec "github.com/opencontainers/runtime-spec/specs-go"
|
spec "github.com/opencontainers/runtime-spec/specs-go"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
@ -159,7 +160,7 @@ func GenVolumeMounts(volumeFlag []string) (map[string]spec.Mount, map[string]*Na
|
|||||||
} else {
|
} else {
|
||||||
newMount := spec.Mount{
|
newMount := spec.Mount{
|
||||||
Destination: dest,
|
Destination: dest,
|
||||||
Type: "bind",
|
Type: define.TypeBind,
|
||||||
Source: src,
|
Source: src,
|
||||||
Options: options,
|
Options: options,
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user