docker

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

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

Go to latest
Published: Jul 18, 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 GetDockerComposeImages

func GetDockerComposeImages(projectName string, env, yml []byte) ([]string, error)

func GetDockerComposeImagesV2

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

func GetImagesFromDockerCompose

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

func NewDockerClient

func NewDockerClient() (*client.Client, 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) ListAllContainers

func (c Client) ListAllContainers() ([]types.Container, error)

func (Client) ListContainersByName

func (c Client) ListContainersByName(names []string) ([]types.Container, 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.Service
}

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    `json:"volumes"`
}

Jump to

Keyboard shortcuts

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