Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultPath defines default value for PATH environment variable. DefaultPath = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" // ApptainerPrefix Apptainer environment variable recognized prefixes for Apptainer CLI ApptainerPrefix = "APPTAINER_" // ApptainerEnvPrefix Apptainer environment variables recognized prefixes for passthru to container ApptainerEnvPrefix = "APPTAINERENV_" // Legacy singularity prefix LegacySingularityPrefix = "SINGULARITY_" // Legacy singularity env prefix LegacySingularityEnvPrefix = "SINGULARITYENV_" )
Variables ¶
View Source
var ApptainerEnvPrefixes = []string{ApptainerEnvPrefix, LegacySingularityEnvPrefix}
ApptainerEnvPrefixes defines the environment variable prefixes for passthru to container
View Source
var ApptainerPrefixes = []string{ApptainerPrefix, LegacySingularityPrefix}
ApptainerPrefixes the following prefixes are for settings looked at by Apptainer command
Functions ¶
func GetenvLegacy ¶ added in v1.0.0
GetenvLegacy retrieves environment variables value from both APPTAINER_ and SINGULARITY_ and display warning accordingly if the old SINGULARITY_ prefix is used. APPTAINER_ prefixed variable always take precedence if not empty.
func SetContainerEnv ¶
func SetContainerEnv(g *generate.Generator, hostEnvs []string, cleanEnv bool, homeDest string) map[string]string
SetContainerEnv cleans environment variables before running the container.
func SetFromList ¶
SetFromList sets environment variables from environ argument list.
func TrimApptainerKey ¶ added in v1.0.0
TrimApptainerKey returns the key without APPTAINER_ prefix.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.