Documentation ¶
Index ¶
- func ToMount(v *types.Volume) mount.Mount
- func ToMounts(volumes []types.Volume) []mount.Mount
- type DockerManager
- func (d *DockerManager) BuildImage(ctx context.Context, dockerfile []byte, imageName string, platform string) (io.ReadCloser, error)
- func (d *DockerManager) BuildMultiArchImage(ctx context.Context, dockerfile []byte, dockerCtx *bytes.Buffer, ...) (io.ReadCloser, []string, error)
- func (d *DockerManager) CommitContainer(ctx context.Context, containerID string, opts types.CommitOptions) (string, error)
- func (d *DockerManager) ContainerList(ctx context.Context, all bool) ([]*types.Container, error)
- func (d *DockerManager) ContainerLogs(ctx context.Context, id string, ShowStdout bool, ShowStderr bool, Follow bool) (io.ReadCloser, error)
- func (d *DockerManager) CopyContentToContainer(ctx context.Context, id, content, dest string) error
- func (d *DockerManager) CopyDirectorToContainer(ctx context.Context, id, srcPath, dstPath string) error
- func (d *DockerManager) CopyFileFromContainer(ctx context.Context, id string, srcPath string) (string, error)
- func (d *DockerManager) CopyToContainer(ctx context.Context, id, srcPath, dstPath string) error
- func (d *DockerManager) CreateContainer(ctx context.Context, opts *types.ContainerConfig, authBase64 string) (string, error)
- func (d *DockerManager) ExecContainer(ctx context.Context, id string, cmd []string, attachStdOut bool) (io.Reader, error)
- func (d *DockerManager) InspectContainer(ctx context.Context, id string) (*types.ContainerConfig, error)
- func (d *DockerManager) InspectImage(ctx context.Context, image string) (*types.ImageInfo, error)
- func (d *DockerManager) ListImage(ctx context.Context, imageName string) ([]string, error)
- func (d *DockerManager) Name() string
- func (d *DockerManager) PullImage(ctx context.Context, imageName string, authBase64 string, platform string) (io.ReadCloser, error)
- func (d *DockerManager) PushImage(ctx context.Context, target string, authBase64 string) (io.ReadCloser, error)
- func (d *DockerManager) RemoveContainer(ctx context.Context, containerID string) error
- func (d *DockerManager) RemoveImage(ctx context.Context, target string) error
- func (d *DockerManager) StartContainer(ctx context.Context, id string) error
- func (d *DockerManager) StopContainer(ctx context.Context, id string, signal string) error
- func (d *DockerManager) TagImage(ctx context.Context, source, target string) error
- func (d *DockerManager) WaitContainer(ctx context.Context, id string, waitCondition string) (*int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 (*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 (*DockerManager) InspectContainer ¶
func (d *DockerManager) InspectContainer(ctx context.Context, id string) (*types.ContainerConfig, error)
func (*DockerManager) InspectImage ¶
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 (*DockerManager) TagImage ¶
func (d *DockerManager) TagImage(ctx context.Context, source, target string) error
func (*DockerManager) WaitContainer ¶
Click to show internal directories.
Click to hide internal directories.