Documentation ¶
Index ¶
- Constants
- type EngineConfig
- func (e *EngineConfig) AppendFilesPath(files ...string)
- func (e *EngineConfig) AppendLibrariesPath(libraries ...string)
- func (e *EngineConfig) GetAddCaps() string
- func (e *EngineConfig) GetAllowSUID() bool
- func (e *EngineConfig) GetBindPath() []bind.Path
- func (e *EngineConfig) GetBootInstance() bool
- func (e *EngineConfig) GetCgroupsJSON() string
- func (e *EngineConfig) GetCommand() string
- func (e *EngineConfig) GetConfigurationFile() string
- func (e *EngineConfig) GetContain() bool
- func (e *EngineConfig) GetCustomHome() bool
- func (e *EngineConfig) GetCwd() string
- func (e *EngineConfig) GetDNS() string
- func (e *EngineConfig) GetDbusSessionBusAddress() string
- func (e *EngineConfig) GetDeleteTempDir() string
- func (e *EngineConfig) GetDropCaps() string
- func (e *EngineConfig) GetEncryptionKey() []byte
- func (e *EngineConfig) GetFakeroot() bool
- func (e *EngineConfig) GetFilesPath() []string
- func (e *EngineConfig) GetFuseMount() []FuseMount
- func (e *EngineConfig) GetHomeDest() string
- func (e *EngineConfig) GetHomeSource() string
- func (e *EngineConfig) GetHostname() string
- func (e *EngineConfig) GetImage() string
- func (e *EngineConfig) GetImageFuse() bool
- func (e *EngineConfig) GetImageList() []image.Image
- func (e *EngineConfig) GetInstance() bool
- func (e *EngineConfig) GetInstanceJoin() bool
- func (e *EngineConfig) GetKeepPrivs() bool
- func (e *EngineConfig) GetLibrariesPath() []string
- func (e *EngineConfig) GetNetwork() string
- func (e *EngineConfig) GetNetworkArgs() []string
- func (e *EngineConfig) GetNoCwd() bool
- func (e *EngineConfig) GetNoDev() bool
- func (e *EngineConfig) GetNoDevPts() bool
- func (e *EngineConfig) GetNoEval() bool
- func (e *EngineConfig) GetNoHome() bool
- func (e *EngineConfig) GetNoHostfs() bool
- func (e *EngineConfig) GetNoInit() bool
- func (e *EngineConfig) GetNoPrivs() bool
- func (e *EngineConfig) GetNoProc() bool
- func (e *EngineConfig) GetNoSetgroups() bool
- func (e *EngineConfig) GetNoSys() bool
- func (e *EngineConfig) GetNoTmp() bool
- func (e *EngineConfig) GetNvCCLI() bool
- func (e *EngineConfig) GetNvCCLIEnv() []string
- func (e *EngineConfig) GetNvLegacy() bool
- func (e *EngineConfig) GetOpenFd() []int
- func (e *EngineConfig) GetOverlayImage() []string
- func (e *EngineConfig) GetRestoreUmask() bool
- func (e *EngineConfig) GetRocm() bool
- func (e *EngineConfig) GetScratchDir() []string
- func (e *EngineConfig) GetSecurity() []string
- func (e *EngineConfig) GetSessionLayer() string
- func (e *EngineConfig) GetShell() string
- func (e *EngineConfig) GetSignalPropagation() bool
- func (e *EngineConfig) GetSingularityEnv() map[string]string
- func (e *EngineConfig) GetSkipBinds() []string
- func (e *EngineConfig) GetTargetGID() []int
- func (e *EngineConfig) GetTargetUID() int
- func (e *EngineConfig) GetTmpDir() string
- func (e *EngineConfig) GetUmask() int
- func (e *EngineConfig) GetUnixSocketPair() [2]int
- func (e *EngineConfig) GetWorkdir() string
- func (e *EngineConfig) GetWritableImage() bool
- func (e *EngineConfig) GetWritableTmpfs() bool
- func (e *EngineConfig) GetXdgRuntimeDir() string
- func (e *EngineConfig) SetAddCaps(caps string)
- func (e *EngineConfig) SetAllowSUID(allow bool)
- func (e *EngineConfig) SetBindPath(bindpath []bind.Path)
- func (e *EngineConfig) SetBootInstance(boot bool)
- func (e *EngineConfig) SetCgroupsJSON(data string)
- func (e *EngineConfig) SetCommand(command string)
- func (e *EngineConfig) SetConfigurationFile(filename string)
- func (e *EngineConfig) SetContain(contain bool)
- func (e *EngineConfig) SetCustomHome(custom bool)
- func (e *EngineConfig) SetCwd(path string)
- func (e *EngineConfig) SetDNS(dns string)
- func (e *EngineConfig) SetDbusSessionBusAddress(address string)
- func (e *EngineConfig) SetDeleteTempDir(dir string)
- func (e *EngineConfig) SetDropCaps(caps string)
- func (e *EngineConfig) SetEncryptionKey(key []byte)
- func (e *EngineConfig) SetFakeroot(fakeroot bool)
- func (e *EngineConfig) SetFilesPath(files []string)
- func (e *EngineConfig) SetFuseMount(mount []string) error
- func (e *EngineConfig) SetHomeDest(dest string)
- func (e *EngineConfig) SetHomeSource(source string)
- func (e *EngineConfig) SetHostname(hostname string)
- func (e *EngineConfig) SetImage(name string)
- func (e *EngineConfig) SetImageFuse(fuse bool)
- func (e *EngineConfig) SetImageList(list []image.Image)
- func (e *EngineConfig) SetInstance(instance bool)
- func (e *EngineConfig) SetInstanceJoin(join bool)
- func (e *EngineConfig) SetKeepPrivs(keep bool)
- func (e *EngineConfig) SetLibrariesPath(libraries []string)
- func (e *EngineConfig) SetNetwork(network string)
- func (e *EngineConfig) SetNetworkArgs(args []string)
- func (e *EngineConfig) SetNoCwd(val bool)
- func (e *EngineConfig) SetNoDev(val bool)
- func (e *EngineConfig) SetNoDevPts(val bool)
- func (e *EngineConfig) SetNoEval(noEval bool)
- func (e *EngineConfig) SetNoHome(val bool)
- func (e *EngineConfig) SetNoHostfs(val bool)
- func (e *EngineConfig) SetNoInit(val bool)
- func (e *EngineConfig) SetNoPrivs(nopriv bool)
- func (e *EngineConfig) SetNoProc(val bool)
- func (e *EngineConfig) SetNoSetgroups(noSetgroups bool)
- func (e *EngineConfig) SetNoSys(val bool)
- func (e *EngineConfig) SetNoTmp(val bool)
- func (e *EngineConfig) SetNvCCLI(nvCCLI bool)
- func (e *EngineConfig) SetNvCCLIEnv(NvCCLIEnv []string)
- func (e *EngineConfig) SetNvLegacy(nv bool)
- func (e *EngineConfig) SetOpenFd(fds []int)
- func (e *EngineConfig) SetOverlayImage(paths []string)
- func (e *EngineConfig) SetRestoreUmask(restoreUmask bool)
- func (e *EngineConfig) SetRocm(rocm bool)
- func (e *EngineConfig) SetScratchDir(scratchdir []string)
- func (e *EngineConfig) SetSecurity(security []string)
- func (e *EngineConfig) SetSessionLayer(sessionLayer string)
- func (e *EngineConfig) SetShell(shell string)
- func (e *EngineConfig) SetSignalPropagation(propagation bool)
- func (e *EngineConfig) SetSingularityEnv(senv map[string]string)
- func (e *EngineConfig) SetSkipBinds(val []string)
- func (e *EngineConfig) SetTargetGID(gid []int)
- func (e *EngineConfig) SetTargetUID(uid int)
- func (e *EngineConfig) SetTmpDir(name string)
- func (e *EngineConfig) SetUmask(umask int)
- func (e *EngineConfig) SetUnixSocketPair(fds [2]int)
- func (e *EngineConfig) SetWorkdir(name string)
- func (e *EngineConfig) SetWritableImage(writable bool)
- func (e *EngineConfig) SetWritableTmpfs(writable bool)
- func (e *EngineConfig) SetXdgRuntimeDir(path string)
- type FuseMount
- type JSONConfig
- type UserInfo
Constants ¶
const ( // DefaultLayer is the string representation for the default layer. DefaultLayer string = "none" // OverlayLayer is the string representation for the overlay layer. OverlayLayer = "overlay" // UnderlayLayer is the string representation for the underlay layer. UnderlayLayer = "underlay" )
const Name = "singularity"
Name is the name of the runtime.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EngineConfig ¶
type EngineConfig struct { JSON *JSONConfig `json:"jsonConfig"` OciConfig *oci.Config `json:"ociConfig"` // File is not passed across stage but stay here for // convenient use by runtime code and plugins. File *singularityconf.File `json:"-"` }
EngineConfig stores the JSONConfig, the OciConfig and the File configuration.
func (*EngineConfig) AppendFilesPath ¶
func (e *EngineConfig) AppendFilesPath(files ...string)
AppendFilesPath adds files to bind in container (eg: --nv)
func (*EngineConfig) AppendLibrariesPath ¶
func (e *EngineConfig) AppendLibrariesPath(libraries ...string)
AppendLibrariesPath adds libraries to bind in container /.singularity.d/libs directory.
func (*EngineConfig) GetAddCaps ¶
func (e *EngineConfig) GetAddCaps() string
GetAddCaps retrieves bounding/effective/permitted/inheritable/ambient capabilities to add.
func (*EngineConfig) GetAllowSUID ¶
func (e *EngineConfig) GetAllowSUID() bool
GetAllowSUID returns true if allow-suid is set and false if not.
func (*EngineConfig) GetBindPath ¶
func (e *EngineConfig) GetBindPath() []bind.Path
GetBindPath retrieves the bind paths.
func (*EngineConfig) GetBootInstance ¶
func (e *EngineConfig) GetBootInstance() bool
GetBootInstance returns if boot flag is set or not
func (*EngineConfig) GetCgroupsJSON ¶
func (e *EngineConfig) GetCgroupsJSON() string
GetCgroupsTOML returns cgroups configuration to apply.
func (*EngineConfig) GetCommand ¶
func (e *EngineConfig) GetCommand() string
GetCommand retrieves action command.
func (*EngineConfig) GetConfigurationFile ¶
func (e *EngineConfig) GetConfigurationFile() string
GetConfigurationFile returns the singularity configuration file to use.
func (*EngineConfig) GetContain ¶
func (e *EngineConfig) GetContain() bool
GetContain returns if contain flag is set or not.
func (*EngineConfig) GetCustomHome ¶
func (e *EngineConfig) GetCustomHome() bool
GetCustomHome retrieves if home path is a custom path.
func (*EngineConfig) GetCwd ¶
func (e *EngineConfig) GetCwd() string
GetCwd returns current working directory.
func (*EngineConfig) GetDNS ¶
func (e *EngineConfig) GetDNS() string
GetDNS retrieves list of DNS servers.
func (*EngineConfig) GetDbusSessionBusAddress ¶
func (e *EngineConfig) GetDbusSessionBusAddress() string
GetDbusSessionBusAddress gets the DBUS_SESSION_BUS_ADDRESS value for rootless operations
func (*EngineConfig) GetDeleteTempDir ¶
func (e *EngineConfig) GetDeleteTempDir() string
GetDeleteTempDir returns the path of the temporary directory containing the root filesystem which must be deleted after use. If no deletion is required, the empty string is returned.
func (*EngineConfig) GetDropCaps ¶
func (e *EngineConfig) GetDropCaps() string
GetDropCaps retrieves bounding/effective/permitted/inheritable/ambient capabilities to drop.
func (*EngineConfig) GetEncryptionKey ¶
func (e *EngineConfig) GetEncryptionKey() []byte
GetEncryptionKey retrieves the key for image's system partition.
func (*EngineConfig) GetFakeroot ¶
func (e *EngineConfig) GetFakeroot() bool
GetFakeroot returns if fakeroot is set or not.
func (*EngineConfig) GetFilesPath ¶
func (e *EngineConfig) GetFilesPath() []string
GetFilesPath returns files to bind in container (eg: --nv).
func (*EngineConfig) GetFuseMount ¶
func (e *EngineConfig) GetFuseMount() []FuseMount
GetFuseMount returns the list of fuse mount after processing by SetFuseMount.
func (*EngineConfig) GetHomeDest ¶
func (e *EngineConfig) GetHomeDest() string
GetHomeDest retrieves the container home directory path.
func (*EngineConfig) GetHomeSource ¶
func (e *EngineConfig) GetHomeSource() string
GetHomeSource retrieves the source home directory path.
func (*EngineConfig) GetHostname ¶
func (e *EngineConfig) GetHostname() string
GetHostname retrieves hostname to use in containee.JSON.
func (*EngineConfig) GetImage ¶
func (e *EngineConfig) GetImage() string
GetImage retrieves the container image path.
func (*EngineConfig) GetImageFuse ¶
func (e *EngineConfig) GetImageFuse() bool
GetImageFuse returns if the ImageDir is a FUSE mount or not.
func (*EngineConfig) GetImageList ¶
func (e *EngineConfig) GetImageList() []image.Image
GetImageList returns image list containing opened images.
func (*EngineConfig) GetInstance ¶
func (e *EngineConfig) GetInstance() bool
GetInstance returns if container run as instance or not.
func (*EngineConfig) GetInstanceJoin ¶
func (e *EngineConfig) GetInstanceJoin() bool
GetInstanceJoin returns if process joins an instance or not.
func (*EngineConfig) GetKeepPrivs ¶
func (e *EngineConfig) GetKeepPrivs() bool
GetKeepPrivs returns if keep-privs is set or not.
func (*EngineConfig) GetLibrariesPath ¶
func (e *EngineConfig) GetLibrariesPath() []string
GetLibrariesPath returns libraries to bind in container /.singularity.d/libs directory.
func (*EngineConfig) GetNetwork ¶
func (e *EngineConfig) GetNetwork() string
GetNetwork retrieves a list of commas separated networks configured in container.
func (*EngineConfig) GetNetworkArgs ¶
func (e *EngineConfig) GetNetworkArgs() []string
GetNetworkArgs retrieves network arguments passed to CNI plugins.
func (*EngineConfig) GetNoCwd ¶
func (e *EngineConfig) GetNoCwd() bool
GetNoCwd returns if no-cwd flag is set or not.
func (*EngineConfig) GetNoDev ¶
func (e *EngineConfig) GetNoDev() bool
GetNoDev returns if no-dev flag is set or not.
func (*EngineConfig) GetNoDevPts ¶
func (e *EngineConfig) GetNoDevPts() bool
GetNoDevPts returns if no-devpts flag is set or not.
func (*EngineConfig) GetNoEval ¶
func (e *EngineConfig) GetNoEval() bool
GetNoEval sets whether to avoid a shell eval on SINGULARITYENV_ and in runscripts generated from OCI containers CMD/ENTRYPOINT.
func (*EngineConfig) GetNoHome ¶
func (e *EngineConfig) GetNoHome() bool
GetNoHome returns if no-home flag is set or not.
func (*EngineConfig) GetNoHostfs ¶
func (e *EngineConfig) GetNoHostfs() bool
GetNoHostfs returns if no-hostfs flag is set or not.
func (*EngineConfig) GetNoInit ¶
func (e *EngineConfig) GetNoInit() bool
GetNoInit returns if noinit flag is set or not.
func (*EngineConfig) GetNoPrivs ¶
func (e *EngineConfig) GetNoPrivs() bool
GetNoPrivs returns if no-privs flag is set or not.
func (*EngineConfig) GetNoProc ¶
func (e *EngineConfig) GetNoProc() bool
GetNoProc returns if no-proc flag is set or not.
func (*EngineConfig) GetNoSetgroups ¶
func (e *EngineConfig) GetNoSetgroups() bool
GetNoSetgroups gets whether to skip the setgroups call for a container in a user namespace.
func (*EngineConfig) GetNoSys ¶
func (e *EngineConfig) GetNoSys() bool
GetNoSys returns if no-sys flag is set or not.
func (*EngineConfig) GetNoTmp ¶
func (e *EngineConfig) GetNoTmp() bool
GetNoTmp returns if no-tmo flag is set or not.
func (*EngineConfig) GetNvCCLI ¶
func (e *EngineConfig) GetNvCCLI() bool
GetNvCCLI returns if NvCCLI flag is set or not.
func (*EngineConfig) GetNvCCLIEnv ¶
func (e *EngineConfig) GetNvCCLIEnv() []string
GetNVCCLIEnv returns env vars holding options for nvidia-container-cli GPU setup
func (*EngineConfig) GetNvLegacy ¶
func (e *EngineConfig) GetNvLegacy() bool
GetNvLegacy returns if nv flag is set or not.
func (*EngineConfig) GetOpenFd ¶
func (e *EngineConfig) GetOpenFd() []int
GetOpenFd returns the list of open file descriptor.
func (*EngineConfig) GetOverlayImage ¶
func (e *EngineConfig) GetOverlayImage() []string
GetOverlayImage retrieves the overlay image path.
func (*EngineConfig) GetRestoreUmask ¶
func (e *EngineConfig) GetRestoreUmask() bool
GetRestoreUmask returns the umask to be used in the container launched process.
func (*EngineConfig) GetRocm ¶
func (e *EngineConfig) GetRocm() bool
GetRocm returns if rocm flag is set or not.
func (*EngineConfig) GetScratchDir ¶
func (e *EngineConfig) GetScratchDir() []string
GetScratchDir retrieves the scratch directory path.
func (*EngineConfig) GetSecurity ¶
func (e *EngineConfig) GetSecurity() []string
GetSecurity returns security feature arguments.
func (*EngineConfig) GetSessionLayer ¶
func (e *EngineConfig) GetSessionLayer() string
GetSessionLayer returns the session layer used to setup the container mount points.
func (*EngineConfig) GetShell ¶
func (e *EngineConfig) GetShell() string
GetShell retrieves shell for shell command.
func (*EngineConfig) GetSignalPropagation ¶
func (e *EngineConfig) GetSignalPropagation() bool
GetSignalPropagation returns if engine propagate signals across processes (see SetSignalPropagation).
func (*EngineConfig) GetSingularityEnv ¶
func (e *EngineConfig) GetSingularityEnv() map[string]string
GetSingularityEnv returns singularity environment variables as a key/value string map.
func (*EngineConfig) GetSkipBinds ¶
func (e *EngineConfig) GetSkipBinds() []string
GetSkipBinds gets bind paths to skip
func (*EngineConfig) GetTargetGID ¶
func (e *EngineConfig) GetTargetGID() []int
GetTargetGID returns the target GIDs.
func (*EngineConfig) GetTargetUID ¶
func (e *EngineConfig) GetTargetUID() int
GetTargetUID returns the target UID.
func (*EngineConfig) GetTmpDir ¶
func (e *EngineConfig) GetTmpDir() string
GetTmpDir retrieves temporary directory path.
func (*EngineConfig) GetUmask ¶
func (e *EngineConfig) GetUmask() int
GetUmask returns the umask to be used in the container launched process.
func (*EngineConfig) GetUnixSocketPair ¶
func (e *EngineConfig) GetUnixSocketPair() [2]int
GetUnixSocketPair returns the unix socketpair previously set in stage one by the engine.
func (*EngineConfig) GetWorkdir ¶
func (e *EngineConfig) GetWorkdir() string
GetWorkdir retrieves the work directory path.
func (*EngineConfig) GetWritableImage ¶
func (e *EngineConfig) GetWritableImage() bool
GetWritableImage returns if the container image is writable or not.
func (*EngineConfig) GetWritableTmpfs ¶
func (e *EngineConfig) GetWritableTmpfs() bool
GetWritableTmpfs returns if writable tmpfs is set or no.
func (*EngineConfig) GetXdgRuntimeDir ¶
func (e *EngineConfig) GetXdgRuntimeDir() string
GetXdgRuntimeDir gets the XDG_RUNTIME_DIR value for rootless operations
func (*EngineConfig) SetAddCaps ¶
func (e *EngineConfig) SetAddCaps(caps string)
SetAddCaps sets bounding/effective/permitted/inheritable/ambient capabilities to add.
func (*EngineConfig) SetAllowSUID ¶
func (e *EngineConfig) SetAllowSUID(allow bool)
SetAllowSUID sets allow-suid flag to allow to run setuid binary inside containee.JSON.
func (*EngineConfig) SetBindPath ¶
func (e *EngineConfig) SetBindPath(bindpath []bind.Path)
SetBindPath sets the paths to bind into container.
func (*EngineConfig) SetBootInstance ¶
func (e *EngineConfig) SetBootInstance(boot bool)
SetBootInstance sets boot flag to execute /sbin/init as main instance process.
func (*EngineConfig) SetCgroupsJSON ¶
func (e *EngineConfig) SetCgroupsJSON(data string)
SetCgroupsJSON sets cgroups configuration to apply.
func (*EngineConfig) SetCommand ¶
func (e *EngineConfig) SetCommand(command string)
SetCommand sets action command to execute.
func (*EngineConfig) SetConfigurationFile ¶
func (e *EngineConfig) SetConfigurationFile(filename string)
SetConfigurationFile sets the singularity configuration file to use instead of the default one.
func (*EngineConfig) SetContain ¶
func (e *EngineConfig) SetContain(contain bool)
SetContain sets contain flag.
func (*EngineConfig) SetCustomHome ¶
func (e *EngineConfig) SetCustomHome(custom bool)
SetCustomHome sets if home path is a custom path or not.
func (*EngineConfig) SetCwd ¶
func (e *EngineConfig) SetCwd(path string)
SetCwd sets current working directory.
func (*EngineConfig) SetDNS ¶
func (e *EngineConfig) SetDNS(dns string)
SetDNS sets a commas separated list of DNS servers to add in resolv.conf.
func (*EngineConfig) SetDbusSessionBusAddress ¶
func (e *EngineConfig) SetDbusSessionBusAddress(address string)
SetDbusSessionBusAddress sets a DBUS_SESSION_BUS_ADDRESS value for rootless operations
func (*EngineConfig) SetDeleteTempDir ¶
func (e *EngineConfig) SetDeleteTempDir(dir string)
SetDeleteTempDir sets dir as the path of the temporary directory containing the root filesystem, which must be deleted after use.
func (*EngineConfig) SetDropCaps ¶
func (e *EngineConfig) SetDropCaps(caps string)
SetDropCaps sets bounding/effective/permitted/inheritable/ambient capabilities to drop.
func (*EngineConfig) SetEncryptionKey ¶
func (e *EngineConfig) SetEncryptionKey(key []byte)
SetEncryptionKey sets the key for the image's system partition.
func (*EngineConfig) SetFakeroot ¶
func (e *EngineConfig) SetFakeroot(fakeroot bool)
SetFakeroot sets fakeroot flag.
func (*EngineConfig) SetFilesPath ¶
func (e *EngineConfig) SetFilesPath(files []string)
SetFilesPath sets files to bind in container (eg: --nv).
func (*EngineConfig) SetFuseMount ¶
func (e *EngineConfig) SetFuseMount(mount []string) error
SetFuseMount takes a list of fuse mount options and sets fuse mount configuration accordingly.
func (*EngineConfig) SetHomeDest ¶
func (e *EngineConfig) SetHomeDest(dest string)
SetHomeDest sets the container home directory path.
func (*EngineConfig) SetHomeSource ¶
func (e *EngineConfig) SetHomeSource(source string)
SetHomeSource sets the source home directory path.
func (*EngineConfig) SetHostname ¶
func (e *EngineConfig) SetHostname(hostname string)
SetHostname sets hostname to use in containee.JSON.
func (*EngineConfig) SetImage ¶
func (e *EngineConfig) SetImage(name string)
SetImage sets the container image path to be used by EngineConfig.JSON.
func (*EngineConfig) SetImageFuse ¶
func (e *EngineConfig) SetImageFuse(fuse bool)
SetImageFuse sets whether the ImageDir is a FUSE mount.
func (*EngineConfig) SetImageList ¶
func (e *EngineConfig) SetImageList(list []image.Image)
SetImageList sets image list containing opened images.
func (*EngineConfig) SetInstance ¶
func (e *EngineConfig) SetInstance(instance bool)
SetInstance sets if container run as instance or not.
func (*EngineConfig) SetInstanceJoin ¶
func (e *EngineConfig) SetInstanceJoin(join bool)
SetInstanceJoin sets if process joins an instance or not.
func (*EngineConfig) SetKeepPrivs ¶
func (e *EngineConfig) SetKeepPrivs(keep bool)
SetKeepPrivs sets keep-privs flag to allow root to retain all privileges.
func (*EngineConfig) SetLibrariesPath ¶
func (e *EngineConfig) SetLibrariesPath(libraries []string)
SetLibrariesPath sets libraries to bind in container /.singularity.d/libs directory.
func (*EngineConfig) SetNetwork ¶
func (e *EngineConfig) SetNetwork(network string)
SetNetwork sets a list of commas separated networks to configure inside container.
func (*EngineConfig) SetNetworkArgs ¶
func (e *EngineConfig) SetNetworkArgs(args []string)
SetNetworkArgs sets network arguments to pass to CNI plugins.
func (*EngineConfig) SetNoCwd ¶
func (e *EngineConfig) SetNoCwd(val bool)
SetNoCwd set flag to not mount CWD
func (*EngineConfig) SetNoDev ¶
func (e *EngineConfig) SetNoDev(val bool)
SetNoDev set flag to not mount dev directory.
func (*EngineConfig) SetNoDevPts ¶
func (e *EngineConfig) SetNoDevPts(val bool)
SetNoDevPts set flag to not mount dev directory.
func (*EngineConfig) SetNoEval ¶
func (e *EngineConfig) SetNoEval(noEval bool)
SetNoEval sets whether to avoid a shell eval on SINGULARITYENV_ and in runscripts generated from OCI containers CMD/ENTRYPOINT.
func (*EngineConfig) SetNoHome ¶
func (e *EngineConfig) SetNoHome(val bool)
SetNoHome set flag to not mount user home directory.
func (*EngineConfig) SetNoHostfs ¶
func (e *EngineConfig) SetNoHostfs(val bool)
SetNoHostfs set flag to not mount all host mounts.
func (*EngineConfig) SetNoInit ¶
func (e *EngineConfig) SetNoInit(val bool)
SetNoInit set noinit flag to not start shim init process.
func (*EngineConfig) SetNoPrivs ¶
func (e *EngineConfig) SetNoPrivs(nopriv bool)
SetNoPrivs sets no-privs flag to force root user to lose all privileges.
func (*EngineConfig) SetNoProc ¶
func (e *EngineConfig) SetNoProc(val bool)
SetNoProc set flag to not mount proc directory.
func (*EngineConfig) SetNoSetgroups ¶
func (e *EngineConfig) SetNoSetgroups(noSetgroups bool)
SetNoSetgroups sets whether to skip the setgroups call for a container in a user namespace.
func (*EngineConfig) SetNoSys ¶
func (e *EngineConfig) SetNoSys(val bool)
SetNoSys set flag to not mount sys directory.
func (*EngineConfig) SetNoTmp ¶
func (e *EngineConfig) SetNoTmp(val bool)
SetNoTmp set flag to not mount tmp directories
func (*EngineConfig) SetNvCCLI ¶
func (e *EngineConfig) SetNvCCLI(nvCCLI bool)
SetNvCCLI sets nvcontainer flag to use nvidia-container-cli for CUDA setup
func (*EngineConfig) SetNvCCLIEnv ¶
func (e *EngineConfig) SetNvCCLIEnv(NvCCLIEnv []string)
SetNVCCLIEnv sets env vars holding options for nvidia-container-cli GPU setup
func (*EngineConfig) SetNvLegacy ¶
func (e *EngineConfig) SetNvLegacy(nv bool)
SetNvLegacy sets nvLegacy flag to bind cuda libraries into containee.JSON.
func (*EngineConfig) SetOpenFd ¶
func (e *EngineConfig) SetOpenFd(fds []int)
SetOpenFd sets a list of open file descriptor.
func (*EngineConfig) SetOverlayImage ¶
func (e *EngineConfig) SetOverlayImage(paths []string)
SetOverlayImage sets the overlay image path to be used on top of container image.
func (*EngineConfig) SetRestoreUmask ¶
func (e *EngineConfig) SetRestoreUmask(restoreUmask bool)
SetRestoreUmask returns whether to restore Umask for the container launched process.
func (*EngineConfig) SetRocm ¶
func (e *EngineConfig) SetRocm(rocm bool)
SetRocm sets rocm flag to bind rocm libraries into containee.JSON.
func (*EngineConfig) SetScratchDir ¶
func (e *EngineConfig) SetScratchDir(scratchdir []string)
SetScratchDir set a scratch directory path.
func (*EngineConfig) SetSecurity ¶
func (e *EngineConfig) SetSecurity(security []string)
SetSecurity sets security feature arguments.
func (*EngineConfig) SetSessionLayer ¶
func (e *EngineConfig) SetSessionLayer(sessionLayer string)
SetSessionLayer sets the session layer to use to setup the container mount points.
func (*EngineConfig) SetShell ¶
func (e *EngineConfig) SetShell(shell string)
SetShell sets shell to be used by shell command.
func (*EngineConfig) SetSignalPropagation ¶
func (e *EngineConfig) SetSignalPropagation(propagation bool)
SetSignalPropagation sets if engine must propagate signals from master process -> container process when PID namespace is disabled or from master process -> sinit process -> container process when PID namespace is enabled.
func (*EngineConfig) SetSingularityEnv ¶
func (e *EngineConfig) SetSingularityEnv(senv map[string]string)
SetSingularityEnv sets singularity environment variables as a key/value string map.
func (*EngineConfig) SetSkipBinds ¶
func (e *EngineConfig) SetSkipBinds(val []string)
SetSkipBinds sets bind paths to skip
func (*EngineConfig) SetTargetGID ¶
func (e *EngineConfig) SetTargetGID(gid []int)
SetTargetGID sets target GIDs to execute container process as group IDs.
func (*EngineConfig) SetTargetUID ¶
func (e *EngineConfig) SetTargetUID(uid int)
SetTargetUID sets target UID to execute the container process as user ID.
func (*EngineConfig) SetTmpDir ¶
func (e *EngineConfig) SetTmpDir(name string)
SetTmpDir sets temporary directory path.
func (*EngineConfig) SetUmask ¶
func (e *EngineConfig) SetUmask(umask int)
SetUmask sets the umask to be used in the container launched process.
func (*EngineConfig) SetUnixSocketPair ¶
func (e *EngineConfig) SetUnixSocketPair(fds [2]int)
SetUnixSocketPair sets a unix socketpair used to pass file descriptors between RPC and master process, actually used to pass /dev/fuse file descriptors.
func (*EngineConfig) SetWorkdir ¶
func (e *EngineConfig) SetWorkdir(name string)
SetWorkdir sets a work directory path.
func (*EngineConfig) SetWritableImage ¶
func (e *EngineConfig) SetWritableImage(writable bool)
SetWritableImage defines the container image as writable or not.
func (*EngineConfig) SetWritableTmpfs ¶
func (e *EngineConfig) SetWritableTmpfs(writable bool)
SetWritableTmpfs sets writable tmpfs flag.
func (*EngineConfig) SetXdgRuntimeDir ¶
func (e *EngineConfig) SetXdgRuntimeDir(path string)
SetXdgRuntimeDir sets a XDG_RUNTIME_DIR value for rootless operations
type FuseMount ¶
type FuseMount struct { Program []string `json:"program,omitempty"` // the FUSE driver program and all required arguments MountPoint string `json:"mountPoint,omitempty"` // the mount point for the FUSE filesystem Fd int `json:"fd,omitempty"` // /dev/fuse file descriptor FromContainer bool `json:"fromContainer,omitempty"` // is FUSE driver program is run from container or from host Daemon bool `json:"daemon,omitempty"` // is FUSE driver program is run in daemon/background mode Cmd *exec.Cmd `json:"-"` // holds the process exec command when FUSE driver run in foreground mode }
FuseMount stores the FUSE-related information required or provided by plugins implementing options to add FUSE filesystems in the container.
type JSONConfig ¶
type JSONConfig struct { ScratchDir []string `json:"scratchdir,omitempty"` OverlayImage []string `json:"overlayImage,omitempty"` NetworkArgs []string `json:"networkArgs,omitempty"` Security []string `json:"security,omitempty"` FilesPath []string `json:"filesPath,omitempty"` LibrariesPath []string `json:"librariesPath,omitempty"` FuseMount []FuseMount `json:"fuseMount,omitempty"` ImageList []image.Image `json:"imageList,omitempty"` BindPath []bind.Path `json:"bindpath,omitempty"` SingularityEnv map[string]string `json:"singularityEnv,omitempty"` UnixSocketPair [2]int `json:"unixSocketPair,omitempty"` OpenFd []int `json:"openFd,omitempty"` TargetGID []int `json:"targetGID,omitempty"` Image string `json:"image"` Workdir string `json:"workdir,omitempty"` CgroupsJSON string `json:"cgroupsJSON,omitempty"` HomeSource string `json:"homedir,omitempty"` HomeDest string `json:"homeDest,omitempty"` Command string `json:"command,omitempty"` Shell string `json:"shell,omitempty"` TmpDir string `json:"tmpdir,omitempty"` AddCaps string `json:"addCaps,omitempty"` DropCaps string `json:"dropCaps,omitempty"` Hostname string `json:"hostname,omitempty"` Network string `json:"network,omitempty"` DNS string `json:"dns,omitempty"` Cwd string `json:"cwd,omitempty"` SessionLayer string `json:"sessionLayer,omitempty"` ConfigurationFile string `json:"configurationFile,omitempty"` EncryptionKey []byte `json:"encryptionKey,omitempty"` TargetUID int `json:"targetUID,omitempty"` WritableImage bool `json:"writableImage,omitempty"` WritableTmpfs bool `json:"writableTmpfs,omitempty"` Contain bool `json:"container,omitempty"` NvLegacy bool `json:"nvLegacy,omitempty"` NvCCLI bool `json:"nvCCLI,omitempty"` NvCCLIEnv []string `json:"NvCCLIEnv,omitempty"` Rocm bool `json:"rocm,omitempty"` CustomHome bool `json:"customHome,omitempty"` Instance bool `json:"instance,omitempty"` InstanceJoin bool `json:"instanceJoin,omitempty"` BootInstance bool `json:"bootInstance,omitempty"` RunPrivileged bool `json:"runPrivileged,omitempty"` AllowSUID bool `json:"allowSUID,omitempty"` KeepPrivs bool `json:"keepPrivs,omitempty"` NoPrivs bool `json:"noPrivs,omitempty"` NoProc bool `json:"noProc,omitempty"` NoSys bool `json:"noSys,omitempty"` NoDev bool `json:"noDev,omitempty"` NoDevPts bool `json:"noDevPts,omitempty"` NoHome bool `json:"noHome,omitempty"` NoTmp bool `json:"noTmp,omitempty"` NoHostfs bool `json:"noHostfs,omitempty"` NoCwd bool `json:"noCwd,omitempty"` SkipBinds []string `json:"skipBinds,omitempty"` NoInit bool `json:"noInit,omitempty"` Fakeroot bool `json:"fakeroot,omitempty"` SignalPropagation bool `json:"signalPropagation,omitempty"` RestoreUmask bool `json:"restoreUmask,omitempty"` DeleteTempDir string `json:"deleteTempDir,omitempty"` ImageFuse bool `json:"imageFuse,omitempty"` Umask int `json:"umask,omitempty"` XdgRuntimeDir string `json:"xdgRuntimeDir,omitempty"` DbusSessionBusAddress string `json:"dbusSessionBusAddress,omitempty"` NoEval bool `json:"noEval,omitempty"` UserInfo UserInfo `json:"userInfo,omitempty"` NoSetgroups bool `json:"noSetgroups,omitempty"` }
JSONConfig stores engine specific configuration that is allowed to be set by the user.