2020-09-24 23:40:57 +08:00
|
|
|
// +build darwin
|
|
|
|
|
|
|
|
package buildah
|
|
|
|
|
|
|
|
import (
|
2021-06-22 16:26:21 +08:00
|
|
|
"github.com/containers/buildah/define"
|
2022-01-06 04:36:49 +08:00
|
|
|
nettypes "github.com/containers/common/libnetwork/types"
|
2021-01-25 21:01:01 +08:00
|
|
|
"github.com/opencontainers/runtime-spec/specs-go"
|
2022-01-06 04:36:49 +08:00
|
|
|
"github.com/containers/storage"
|
2020-09-24 23:40:57 +08:00
|
|
|
"github.com/pkg/errors"
|
|
|
|
)
|
|
|
|
|
|
|
|
// ContainerDevices is an alias for a slice of github.com/opencontainers/runc/libcontainer/configs.Device structures.
|
2021-06-22 16:26:21 +08:00
|
|
|
type ContainerDevices define.ContainerDevices
|
2020-09-24 23:40:57 +08:00
|
|
|
|
|
|
|
func setChildProcess() error {
|
|
|
|
return errors.New("function not supported on non-linux systems")
|
|
|
|
}
|
|
|
|
|
|
|
|
func runUsingRuntimeMain() {}
|
|
|
|
|
|
|
|
func (b *Builder) Run(command []string, options RunOptions) error {
|
|
|
|
return errors.New("function not supported on non-linux systems")
|
|
|
|
}
|
|
|
|
func DefaultNamespaceOptions() (NamespaceOptions, error) {
|
2021-01-25 21:01:01 +08:00
|
|
|
options := NamespaceOptions{
|
|
|
|
{Name: string(specs.CgroupNamespace), Host: false},
|
|
|
|
{Name: string(specs.IPCNamespace), Host: false},
|
|
|
|
{Name: string(specs.MountNamespace), Host: false},
|
|
|
|
{Name: string(specs.NetworkNamespace), Host: false},
|
|
|
|
{Name: string(specs.PIDNamespace), Host: false},
|
|
|
|
{Name: string(specs.UserNamespace), Host: false},
|
|
|
|
{Name: string(specs.UTSNamespace), Host: false},
|
|
|
|
}
|
|
|
|
return options, nil
|
2020-09-24 23:40:57 +08:00
|
|
|
}
|
2022-01-06 04:36:49 +08:00
|
|
|
|
|
|
|
// getNetworkInterface creates the network interface
|
|
|
|
func getNetworkInterface(store storage.Store, cniConfDir, cniPluginPath string) (nettypes.ContainerNetwork, error) {
|
|
|
|
return nil, errors.New("function not supported on non-linux systems")
|
|
|
|
}
|