docker

package
v0.0.0-...-0d88966 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: Unlicense Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackupContainers

func BackupContainers() error

func DeleteOldBackups

func DeleteOldBackups() error

func GetHostBackupPath

func GetHostBackupPath(containers []types.Container) string

func Init

func Init()

func MonitorContainers

func MonitorContainers(contInfos *[]ContainerInfo) error

func PullImage

func PullImage(imageName string) error

func RemoveContainer

func RemoveContainer(containerId string) error

func RunBackupHelperForContainer

func RunBackupHelperForContainer(container types.Container, hostBackupPath string) error

func RunContainer

func RunContainer(p RunContainerParams) ([]byte, error)

func RunOSCmd

func RunOSCmd(cmdType, cmd string) ([]byte, error)

Types

type ContainerInfo

type ContainerInfo struct {
	ID           string
	Name         string
	States       []string
	MonitorState string
}

type RunContainerParams

type RunContainerParams struct {
	ContainerName string
	ImageName     string
	Cmd           []string
	Remove        bool
	Volumes       map[string]struct{}
	VolumesFrom   []string
	Mounts        []mount.Mount
}

Jump to

Keyboard shortcuts

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