Documentation
¶
Index ¶
- Constants
- func MaybeRunInNamespace(config types.StackerConfig, userCmd []string) error
- type Container
- func (c *Container) BindMount(source string, dest string, extraOpts string) error
- func (c *Container) Close()
- func (c *Container) Execute(args []string, stdin io.Reader) error
- func (c *Container) SaveConfigFile(p string) error
- func (c *Container) SetConfig(name string, value string) error
- func (c *Container) SetConfigs(config map[string]string) error
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 ¶
Click to show internal directories.
Click to hide internal directories.