docker

package
v0.0.0-...-9e9b179 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCanonicalContainerName

func GetCanonicalContainerName(c types.Container) string

func UpDbContainer

func UpDbContainer() error

UpDbContainer Run db container before dump

Types

type Client

type Client struct {
	DockerCli command.Cli
	Backend   api.Service
}

Client docker client

func NewClient

func NewClient() (*Client, error)

NewClient docker client initialization

func (*Client) DisplayablePorts

func (cli *Client) DisplayablePorts(c ContainerSummary) string

DisplayablePorts returns formatted string representing open ports of container

func (*Client) IsServiceRunning

func (cli *Client) IsServiceRunning(ctx context.Context) bool

IsServiceRunning Checking if local services running

func (*Client) StartContainers

func (cli *Client) StartContainers(ctx context.Context, project *types.Project, recreate bool) error

StartContainers running docker containers

type Container

type Container struct {
	Name       string
	Image      string
	Version    string
	Cmd        []string
	Volumes    map[string]struct{}
	Entrypoint []string
	Labels     map[string]string
	Ports      []string
	Mounts     []mount.Mount
	Env        []string
	Network    string
	AddNetwork string
}

Container contains container data needed to run

type ContainerSummary

type ContainerSummary struct {
	ID         string
	Name       string
	State      string
	Health     string
	IPAddress  string
	ExitCode   int
	Publishers PortPublishers
}

type Containers

type Containers []Container

Containers container array

type PortPublisher

type PortPublisher struct {
	URL           string
	TargetPort    int
	PublishedPort int
	Protocol      string
}

type PortPublishers

type PortPublishers []PortPublisher

Jump to

Keyboard shortcuts

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