docker

package
v0.14.9 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: Apache-2.0 Imports: 36 Imported by: 1

Documentation

Index

Constants

View Source
const DockerCommandEnvVarName = "R8_DOCKER_COMMAND"

Variables

View Source
var ErrMissingDeviceDriver = errors.New("Docker is missing required device driver")

Functions

func CreateAptTarball added in v0.14.0

func CreateAptTarball(ctx context.Context, tmpDir string, dockerCommand command.Command, packages ...string) (string, error)

func CurrentAptTarball added in v0.14.0

func CurrentAptTarball(tmpDir string) (string, error)

func DockerCommandFromEnvironment added in v0.14.0

func DockerCommandFromEnvironment() string

func DockerCredentialBinary added in v0.14.0

func DockerCredentialBinary(credsStore string) string

func FastPush added in v0.14.0

func FastPush(ctx context.Context, image string, projectDir string, command command.Command, webClient *web.Client, monobeamClient *monobeam.Client) error

func GetPort added in v0.7.0

func GetPort(ctx context.Context, containerID string, containerPort int) (int, error)

func ManifestInspect added in v0.9.10

func ManifestInspect(ctx context.Context, image string) error

func Push added in v0.0.8

func Push(ctx context.Context, image string, fast bool, projectDir string, command command.Command, buildInfo BuildInfo, client *http.Client) error

func Run added in v0.0.8

func Run(ctx context.Context, options RunOptions) error

func RunDaemon added in v0.0.8

func RunDaemon(ctx context.Context, options RunOptions, stderr io.Writer) (string, error)

func RunWithIO added in v0.0.8

func RunWithIO(ctx context.Context, options RunOptions, stdin io.Reader, stdout, stderr io.Writer) error

func SaveLoginToken added in v0.0.8

func SaveLoginToken(ctx context.Context, registryHost string, username string, token string) error

func StandardPush added in v0.14.0

func StandardPush(ctx context.Context, image string, command command.Command) error

Types

type BuildInfo added in v0.14.0

type BuildInfo struct {
	BuildTime time.Duration
	BuildID   string
}

type CredentialHelperInput added in v0.14.0

type CredentialHelperInput struct {
	Username  string
	Secret    string
	ServerURL string
}

type DockerCommand added in v0.14.0

type DockerCommand struct{}

func NewDockerCommand added in v0.14.0

func NewDockerCommand() *DockerCommand

func (*DockerCommand) ContainerInspect added in v0.14.8

func (c *DockerCommand) ContainerInspect(ctx context.Context, id string) (*container.InspectResponse, error)

func (*DockerCommand) ContainerLogs added in v0.14.8

func (c *DockerCommand) ContainerLogs(ctx context.Context, containerID string, w io.Writer) error

func (*DockerCommand) ContainerStop added in v0.14.8

func (c *DockerCommand) ContainerStop(ctx context.Context, containerID string) error

func (*DockerCommand) CreateAptTarFile added in v0.14.0

func (c *DockerCommand) CreateAptTarFile(ctx context.Context, tmpDir string, aptTarFile string, packages ...string) (string, error)

func (*DockerCommand) CreateTarFile added in v0.14.0

func (c *DockerCommand) CreateTarFile(ctx context.Context, image string, tmpDir string, tarFile string, folder string) (string, error)

func (*DockerCommand) ImageBuild added in v0.14.9

func (c *DockerCommand) ImageBuild(ctx context.Context, options command.ImageBuildOptions) error

func (*DockerCommand) ImageExists added in v0.14.8

func (c *DockerCommand) ImageExists(ctx context.Context, ref string) (bool, error)

func (*DockerCommand) Inspect added in v0.14.0

func (c *DockerCommand) Inspect(ctx context.Context, ref string) (*image.InspectResponse, error)

func (*DockerCommand) LoadUserInformation added in v0.14.0

func (c *DockerCommand) LoadUserInformation(ctx context.Context, registryHost string) (*command.UserInfo, error)

func (*DockerCommand) Pull added in v0.14.0

func (c *DockerCommand) Pull(ctx context.Context, image string, force bool) (*image.InspectResponse, error)

func (*DockerCommand) Push added in v0.14.0

func (c *DockerCommand) Push(ctx context.Context, image string) error

type Port added in v0.0.8

type Port struct {
	HostPort      int
	ContainerPort int
}

type RunOptions added in v0.0.8

type RunOptions struct {
	Args     []string
	Env      []string
	GPUs     string
	Image    string
	Ports    []Port
	Volumes  []Volume
	Workdir  string
	Platform string
}

func FillInWeightsManifestVolumes added in v0.14.4

func FillInWeightsManifestVolumes(ctx context.Context, dockerCommand command.Command, runOptions RunOptions) (RunOptions, error)

type Volume added in v0.0.8

type Volume struct {
	Source      string
	Destination string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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