docker

package
v0.0.0-...-099896d Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2025 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDefaultDockerNetwork

func CreateDefaultDockerNetwork() error

func GetComposeProject

func GetComposeProject(projectName, workDir string, yml []byte, env []byte, skipNormalization bool) (*types.Project, error)

func GetImagesFromDockerCompose

func GetImagesFromDockerCompose(env, yml []byte) ([]string, error)

func NewDockerClient

func NewDockerClient() (*client.Client, error)

func PullImage

func PullImage(imageName string) error

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient() (Client, error)

func NewClientWithExist

func NewClientWithExist(cli *client.Client) Client

func (Client) BuildImageWithProcessAndOptions

func (c Client) BuildImageWithProcessAndOptions(task *task.Task, tar io.ReadCloser, options types.ImageBuildOptions) error

func (Client) Close

func (c Client) Close()

func (Client) CreateNetwork

func (c Client) CreateNetwork(name string) error

func (Client) DeleteImage

func (c Client) DeleteImage(imageID string) error

func (Client) GetImageIDByName

func (c Client) GetImageIDByName(imageName string) (string, error)

func (Client) ImageExists

func (c Client) ImageExists(imageID string) (bool, error)

func (Client) ListAllContainers

func (c Client) ListAllContainers() ([]container.Summary, error)

func (Client) ListContainersByName

func (c Client) ListContainersByName(names []string) ([]container.Summary, error)

func (Client) NetworkExist

func (c Client) NetworkExist(name string) bool

func (Client) PullImageWithProcess

func (c Client) PullImageWithProcess(task *task.Task, imageName string) error

func (Client) PullImageWithProcessAndOptions

func (c Client) PullImageWithProcessAndOptions(task *task.Task, imageName string, options image.PullOptions) error

func (Client) PushImageWithProcessAndOptions

func (c Client) PushImageWithProcessAndOptions(task *task.Task, imageName string, options image.PushOptions) error

type ComposeProject

type ComposeProject struct {
	Version  string
	Services map[string]Service `yaml:"services"`
}

type ComposeService

type ComposeService struct {
	api.Compose
}

type Environment

type Environment struct {
	Variables map[string]string
}

func (*Environment) UnmarshalYAML

func (e *Environment) UnmarshalYAML(value *yaml.Node) error

type Service

type Service struct {
	Image       string      `yaml:"image"`
	Environment Environment `yaml:"environment"`
	Volumes     []string    `yaml:"volumes"`
	ExtraHosts  []string    `yaml:"extra_hosts"`
	Restart     string      `yaml:"restart"`
}

Jump to

Keyboard shortcuts

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