Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Exec ¶
func Exec(ctx context.Context, opts ExecOptions) error
Exec executes a command in a running instance
Types ¶
type ExecOptions ¶
type ExecOptions struct {
Name string // Instance name
Command []string // Command to execute
EnvSettings []string // Additional environment variables to set (format: "KEY=VALUE")
ApptainerFlags []string // Additional apptainer flags to pass through
ApptainerBin string // Path to apptainer binary
PrintEnv bool // Whether to print environment variables (when command length <= 1)
}
ExecOptions holds configuration for executing commands in an instance
type Options ¶
type Options struct {
Name string // Instance name
Overlays []string // Overlay paths
WritableImg bool // Whether .img overlays should be writable
EnvSettings []string // Environment variables
BindPaths []string // Bind mount paths
ApptainerFlags []string // Additional apptainer flags
Fakeroot bool // Run with fakeroot
BaseImage string // Base image path
ApptainerBin string // Path to apptainer binary
}
Options holds configuration for starting an instance
type State ¶
type State struct {
Name string `json:"name"`
Env []string `json:"env"` // Environment variables
Overlays []string `json:"overlays"` // Overlay paths
BindPaths []string `json:"bind_paths"` // Bind paths
BaseImage string `json:"base_image"` // Base image path
Notes map[string]string `json:"notes"` // Environment variable notes for display
}
State holds the runtime state of an instance apptainer exec instance://NAME cannot use the ENV used with instance start, so we have to save them here to be loaded by exec
type StopOptions ¶
type StopOptions struct {
ApptainerBin string // Path to apptainer binary
ApptainerFlags []string // All arguments to pass to apptainer instance stop
All bool // Whether --all flag is set
InstanceNames []string // Instance names/patterns to stop
}
StopOptions holds configuration for stopping an instance
Click to show internal directories.
Click to hide internal directories.