docker

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToMount

func ToMount(v *types.Volume) mount.Mount

func ToMounts

func ToMounts(volumes []types.Volume) []mount.Mount

Types

type DockerManager

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

func NewDockerManager

func NewDockerManager() (*DockerManager, error)

func (*DockerManager) BuildImage

func (d *DockerManager) BuildImage(ctx context.Context, dockerfile []byte, imageName string, platform string) (io.ReadCloser, error)

func (*DockerManager) BuildMultiArchImage

func (d *DockerManager) BuildMultiArchImage(ctx context.Context, dockerfile []byte, dockerCtx *bytes.Buffer, imageName string, platforms []string, authBase64 string) (io.ReadCloser, []string, error)

BuildMultiArchImage builds a multi-architecture image using docker cli because the golang client doesn't support it yet

func (*DockerManager) CommitContainer

func (d *DockerManager) CommitContainer(ctx context.Context, containerID string, opts types.CommitOptions) (string, error)

func (*DockerManager) ContainerList

func (d *DockerManager) ContainerList(ctx context.Context, all bool) ([]*types.Container, error)

func (*DockerManager) ContainerLogs

func (d *DockerManager) ContainerLogs(ctx context.Context, id string, ShowStdout bool, ShowStderr bool, Follow bool) (io.ReadCloser, error)

func (*DockerManager) CopyContentToContainer

func (d *DockerManager) CopyContentToContainer(ctx context.Context, id, content, dest string) error

func (*DockerManager) CopyDirectorToContainer

func (d *DockerManager) CopyDirectorToContainer(ctx context.Context, id, srcPath, dstPath string) error

func (*DockerManager) CopyFileFromContainer

func (d *DockerManager) CopyFileFromContainer(ctx context.Context, id string, srcPath string) (string, error)

CopyFileFromContainer reads a single file from a container and returns its content as a string.

func (*DockerManager) CopyToContainer

func (d *DockerManager) CopyToContainer(ctx context.Context, id, srcPath, dstPath string) error

func (*DockerManager) CreateContainer

func (d *DockerManager) CreateContainer(ctx context.Context, opts *types.ContainerConfig, authBase64 string) (string, error)

func (*DockerManager) ExecContainer

func (d *DockerManager) ExecContainer(ctx context.Context, id string, cmd []string, attachStdOut bool) (io.Reader, error)

func (*DockerManager) InspectContainer

func (d *DockerManager) InspectContainer(ctx context.Context, id string) (*types.ContainerConfig, error)

func (*DockerManager) InspectImage

func (d *DockerManager) InspectImage(ctx context.Context, image string) (*types.ImageInfo, error)

func (*DockerManager) ListImage

func (d *DockerManager) ListImage(ctx context.Context, imageName string) ([]string, error)

func (*DockerManager) Name

func (d *DockerManager) Name() string

func (*DockerManager) PullImage

func (d *DockerManager) PullImage(ctx context.Context, imageName string, authBase64 string, platform string) (io.ReadCloser, error)

func (*DockerManager) PushImage

func (d *DockerManager) PushImage(ctx context.Context, target string, authBase64 string) (io.ReadCloser, error)

func (*DockerManager) RemoveContainer

func (d *DockerManager) RemoveContainer(ctx context.Context, containerID string) error

func (*DockerManager) RemoveImage

func (d *DockerManager) RemoveImage(ctx context.Context, target string) error

func (*DockerManager) StartContainer

func (d *DockerManager) StartContainer(ctx context.Context, id string) error

func (*DockerManager) StopContainer

func (d *DockerManager) StopContainer(ctx context.Context, id string, signal string) error

func (*DockerManager) TagImage

func (d *DockerManager) TagImage(ctx context.Context, source, target string) error

func (*DockerManager) WaitContainer

func (d *DockerManager) WaitContainer(ctx context.Context, id string, waitCondition string) (*int64, error)

Jump to

Keyboard shortcuts

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