functions

package
v0.0.0-...-bf77536 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateVolumeMount

func CreateVolumeMount(vol string) (mount.Mount, error)

Types

type Container

type Container struct {
	Name                     string               `yaml:"Name"`
	DockerImage              string               `yaml:"DockerImage"`
	EnvironmentVariableFiles string               `yaml:"EnvironmentVariableFiles"`
	Envs                     []string             `yaml:"Envs"`
	Volumes                  []string             `yaml:"Volumes"`
	Entrypoint               string               `yaml:"Entrypoint"`
	HostConfig               container.HostConfig `yaml:"HostConfig"`
}

type Containers

type Containers struct {
	Containers   []Container `yaml:"Containers"`
	InputSrc     string      `yaml:"InputSrc"`
	TargetDevice string      `yaml:"TargetDevice"`
}

func GetYamlConfig

func GetYamlConfig(configDir string) (Containers, error)

func (*Containers) DockerStartContainer

func (containerArray *Containers) DockerStartContainer(ctx context.Context, cli *client.Client) error

Create and start the Docker container

func (*Containers) GetEnv

func (containerArray *Containers) GetEnv(configDir string) error

func (*Containers) OverrideEnv

func (containerArray *Containers) OverrideEnv(envOverrides []string) error

func (*Containers) SetHostDevice

func (containerArray *Containers) SetHostDevice(device string)

Setup the device mount

func (*Containers) SetHostNetwork

func (containerArray *Containers) SetHostNetwork()

Set container to use host network

func (*Containers) SetInputSrc

func (containerArray *Containers) SetInputSrc() error

Setup devices and other mounts based on the inputsrc

func (*Containers) SetPrivileged

func (containerArray *Containers) SetPrivileged()

Set the container to privileged mode

func (*Containers) SetTargetDevice

func (containerArray *Containers) SetTargetDevice() error

Setup device mounts and ENV based on the targe device input

func (*Containers) SetVolumes

func (containerArray *Containers) SetVolumes(volumes []string) error

Setup volume mounts for the countainer

Jump to

Keyboard shortcuts

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