container

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DOCKER binary name of docker
	DOCKER = "docker"
	// PODMAN binary name of podman
	PODMAN = "podman"
	// Linux name in runtime.GOOS
	LINUX = "linux"
	// MACOS name in runtime.GOOS
	MACOS = "darwin"
)

Variables

This section is empty.

Functions

func GetConfigDirectory

func GetConfigDirectory() (string, error)

GetConfigDirectory returns pull secret file saving path Defaults to ~/.kube/ocm-pull-secret

Types

type ContainerEngine

type ContainerEngine interface {
	PullImage(imageName string) error
	PutFileToMount(filename string, content []byte) error
	StopContainer(containerName string) error
	RunConsoleContainer(containerName string, port string, consoleArgs []string, envVars []EnvVar) error
	RunMonitorPlugin(containerName string, consoleContainerName string, nginxConf string, pluginArgs []string, envVars []EnvVar) error
	ContainerIsExist(containerName string) (bool, error)
}

func NewEngine

func NewEngine(osName, containerEngine string) (ContainerEngine, error)

NewEngine creates a new container engine instance based on the operating system and container engine type. Supported combinations: Linux/Podman, macOS/Podman, Linux/Docker, macOS/Docker. Returns an error for unsupported combinations.

type EnvVar

type EnvVar struct {
	Key   string
	Value string
}

EnvVar for environment variable passing to container

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL