types

package
v0.0.0-...-6ac7c4f Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildImageInput

type BuildImageInput struct {
	ContextDir string
	Dockerfile string
	ImageTag   string
	Platform   string
}

type Container

type Container interface {
	Create(capAdd []string, capDrop []string) common.Executor
	CopyIn(containerPath string, hostPath string, useGitIgnore bool) common.Executor
	CopyOut(hostPath string, containerPath string) common.Executor
	Pull(forcePull bool) common.Executor
	Start(attach bool) common.Executor
	Exec(command []string, env map[string]string, user, workdir string) common.Executor
	Remove() common.Executor
	Close() common.Executor
}

Container for managing docker run containers

type ContainerService

type ContainerService interface {
	NewContainer(input NewContainerInput) Container
	ImageExistsLocally(ctx context.Context, imageName string, platform string) (bool, error)
	BuildImage(input BuildImageInput) common.Executor
}

type ContainerServiceProvider

type ContainerServiceProvider interface {
	Available(ctx context.Context) bool
	NewContainerService() ContainerService
}

ContainerServiceProvider describes how a service can be created

type FileEntry

type FileEntry struct {
	Name string
	Mode int64
	Body string
}

FileEntry is a file to copy to a container

type NewContainerInput

type NewContainerInput struct {
	Image       string
	Username    string
	Password    string
	Entrypoint  []string
	Cmd         []string
	WorkingDir  string
	Env         []string
	Binds       []string
	Mounts      map[string]string
	Name        string
	Stdout      io.Writer
	Stderr      io.Writer
	NetworkMode string
	Privileged  bool
	UsernsMode  string
	Platform    string
	Options     string
}

NewContainerInput the input for the New function

Jump to

Keyboard shortcuts

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