docker

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearWhenInterruption

func ClearWhenInterruption(options configmanager.RawOptions) error

ClearWhenInterruption will delete the container if the container fails to run

func ComposeDown

func ComposeDown(options configmanager.RawOptions) error

func ComposeUp

func ComposeUp(options configmanager.RawOptions) error

func DeleteAll

func DeleteAll(options configmanager.RawOptions) error

DeleteAll will delete the container/volumes

func Install

func Install(options configmanager.RawOptions) error

Install runs the docker container

func PathExist

func PathExist(path string) bool

func RemoveDirs

func RemoveDirs(dirs []string) []error

RemoveDirs removes the all the directories in the given list recursively

Types

type Options

type Options struct {
	ImageName         string `validate:"required"`
	ImageTag          string `validate:"required"`
	ContainerName     string `validate:"required"`
	RmDataAfterDelete *bool

	RunParams     []string
	Hostname      string
	PortPublishes []docker.PortPublish
	Volumes       docker.Volumes
	RestartAlways bool
}

func NewOptions

func NewOptions(options configmanager.RawOptions) (Options, error)

NewOptions create options by raw options

func (*Options) GetImageNameWithTag

func (opts *Options) GetImageNameWithTag() string

func (*Options) GetRunOpts

func (opts *Options) GetRunOpts() *docker.RunOptions

type State

type State struct {
	ContainerRunning bool
	Volumes          []string
	Hostname         string
	PortPublishes    []docker.PortPublish
}

func (*State) ToMap

func (s *State) ToMap() (map[string]interface{}, error)

Jump to

Keyboard shortcuts

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