docker

package
v0.0.0-...-7b28b5b Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const NETWORK_NAME = "takeout"

Variables

This section is empty.

Functions

func BuildImageName

func BuildImageName(organization string, imageName string, tag string) string

func CreateContainer

func CreateContainer(args []string) error

create a new container

func EnsureNetworkCreated

func EnsureNetworkCreated() error

func ForwardOutputToStdOut

func ForwardOutputToStdOut(cmd *exec.Cmd) error

func GetAttachedVolumeName

func GetAttachedVolumeName(id string) (string, error)

func GetLatestTag

func GetLatestTag(organization string, imageName string) (string, error)

func GetNetworkSettings

func GetNetworkSettings(alias string, imageName string) []string

func ImageExists

func ImageExists(imgName string) bool

func LogContainer

func LogContainer(container *Container) error

forward container logs to stdout

func PullImage

func PullImage(imgName string) error

func RemoveContainer

func RemoveContainer(container *Container) error

remove a container

func RemoveVolume

func RemoveVolume(name string) error

func ResolveTag

func ResolveTag(organization string, image string, tag string) (string, error)

func StartContainer

func StartContainer(container *Container) error

func StopContainer

func StopContainer(container *Container) error

Types

type Container

type Container struct {
	Id        string `json:"id"`
	Name      string `json:"name"`
	Status    string `json:"status"`
	Ports     string `json:"ports"`
	BaseAlias string `json:"base_alias"`
	FullAlias string `json:"full_alias"`
}

func FindContainer

func FindContainer(id string, containers []*Container) *Container

func StartableTakawayContainers

func StartableTakawayContainers() ([]*Container, error)

func StoppableTakeawayContainers

func StoppableTakeawayContainers() ([]*Container, error)

func TakeawayContainers

func TakeawayContainers() ([]*Container, error)

func (*Container) String

func (c *Container) String() string

type Network

type Network struct {
	ID   string
	Name string
}

func GetMatchingNetworks

func GetMatchingNetworks() ([]Network, error)

type Tag

type Tag struct {
	Name   string `json:"name"`
	Semver string `json:"semver"`
}

func GetTagsFromDocker

func GetTagsFromDocker(organization string, image string) ([]Tag, error)

type TagResponse

type TagResponse struct {
	Count    int64       `json:"count"`
	Next     interface{} `json:"next"`
	Previous interface{} `json:"previous"`
	Tags     []Tag       `json:"results"`
}

type Volumes

type Volumes struct {
	Name string
}

Jump to

Keyboard shortcuts

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