container

package
v1.0.0-rc14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReasonableDefaultPath = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
)

Variables

This section is empty.

Functions

func MaybeRunInNamespace

func MaybeRunInNamespace(config types.StackerConfig, userCmd []string) error

A wrapper which executes userCmd in a namespace if stacker has not already entered a namespace. If it has (STACKER_REAL_UID is set), then it will simply exeucte the userCmd.

If the real uid is 0, then use 'nsexec', otherwise use 'usernsexec'.

Types

type Container

type Container struct {
	// contains filtered or unexported fields
}

our representation of a container

func New

func New(sc types.StackerConfig, name string) (*Container, error)

func (*Container) BindMount

func (c *Container) BindMount(source string, dest string, extraOpts string) error

func (*Container) Close

func (c *Container) Close()

func (*Container) Execute

func (c *Container) Execute(args []string, stdin io.Reader) error

func (*Container) SaveConfigFile

func (c *Container) SaveConfigFile(p string) error

func (*Container) SetConfig

func (c *Container) SetConfig(name string, value string) error

func (*Container) SetConfigs

func (c *Container) SetConfigs(config map[string]string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL