Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunContainer ¶
func RunContainer(ctx context.Context, args RunContainerArgs) uint32
RunContainer pulls an image and runs a container via containerd. It blocks until the container exits and returns the exit code.
Types ¶
type RunContainerArgs ¶
type RunContainerArgs struct {
// Container image reference (e.g. ghcr.io/obmondo/kubeaid-core:v0.20.0).
ImageRef string
// Command to execute inside the container.
Command []string
// Bind mounts: host path -> container path.
Binds map[string]string
// Environment variables.
Env []string
}
RunContainerArgs holds the arguments for running a container via containerd.
Click to show internal directories.
Click to hide internal directories.