runcontainer

package
v0.0.0-...-f7ae9ec Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckVersionRange

func CheckVersionRange(version, compare string) (bool, error)

Types

type DockerConfig

type DockerConfig struct {
	Image                string            `yaml:"docker-image,omitempty" json:"docker-image,omitempty" hcl:"docker-image,omitempty"`
	ImageTag             string            `yaml:"docker-image-tag,omitempty" json:"docker-image-tag,omitempty" hcl:"docker-image-tag,omitempty"`
	EntryPoint           string            `yaml:"entry-point,omitempty" json:"entry-point,omitempty" hcl:"entry-point,omitempty"`
	MountPoint           string            `yaml:"mount-point,omitempty" json:"mount-point,omitempty" hcl:"mount-point,omitempty"`
	DockerInteractive    bool              `yaml:"docker-interactive,omitempty" json:"docker-interactive,omitempty" hcl:"docker-interactive,omitempty"`
	WithDockerMount      bool              `yaml:"with-docker-mount,omitempty" json:"with-docker-mount,omitempty" hcl:"with-docker-mount,omitempty"`
	WithCurrentUser      bool              `yaml:"with-current-user,omitempty" json:"with-current-user,omitempty" hcl:"with-current-user,omitempty"`
	MountHomeDirectory   bool              `yaml:"mount-home-directory,omitempty" json:"mount-home-directory,omitempty" hcl:"mount-home-directory,omitempty"`
	DockerOptions        []string          `yaml:"docker-options,omitempty" json:"docker-options,omitempty" hcl:"docker-options,omitempty"`
	TempDirMountLocation MountLocation     `yaml:"temp-dir-mount-location,omitempty" json:"temp-dir-mount-location,omitempty" hcl:"temp-dir-mount-location,omitempty"`
	Environment          map[string]string `yaml:"environment,omitempty" json:"environment,omitempty" hcl:"environment,omitempty"`
	RunBeforeCommands    []string          `yaml:"run-before-commands,omitempty" json:"run-before-commands,omitempty" hcl:"run-before-commands,omitempty"`
	RunAfterCommands     []string          `yaml:"run-after-commands,omitempty" json:"run-after-commands,omitempty" hcl:"run-after-commands,omitempty"`
}

func (*DockerConfig) Execute

func (config *DockerConfig) Execute() int

func (*DockerConfig) GetActualImageVersion

func (config *DockerConfig) GetActualImageVersion() (string, error)

GetActualImageVersion returns the real image version stored in the environment variable TGF_IMAGE_VERSION

func (*DockerConfig) GetImageName

func (config *DockerConfig) GetImageName() string

type DockerConfigs

type DockerConfigs struct {
	DefaultProfile string                   `yaml:"default-profile,omitempty" json:"default-profile,omitempty" hcl:"default-profile,omitempty"`
	Configs        map[string]*DockerConfig `yaml:"configs,omitempty" json:"configs,omitempty" hcl:"configs,omitempty"`
}

type MountLocation

type MountLocation string

MountLocation is a docker mount location

const (
	MountLocNone   MountLocation = "none"
	MountLocHost   MountLocation = "host"
	MountLocVolume MountLocation = "volume"
)

Mount locations

Jump to

Keyboard shortcuts

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