docker

package
v0.16.6 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 License: Apache-2.0 Imports: 68 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")
View Source
var TarballsDir = filepath.Join(global.CogBuildArtifactsFolder, "tarballs")

Functions

func CreateAptTarFile added in v0.15.0

func CreateAptTarFile(ctx context.Context, dockerClient command.Command, tmpDir string, aptTarFile string, packages ...string) (string, error)

func CreateAptTarball added in v0.14.0

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

func CreateTarFile added in v0.15.0

func CreateTarFile(ctx context.Context, dockerClient command.Command, image string, tmpDir string, tarFile string, folder 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 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 FillInWeightsManifestVolumes added in v0.14.4

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

func GetHostPortForContainer added in v0.14.11

func GetHostPortForContainer(ctx context.Context, dockerCommand command.Command, containerID string, containerPort int) (int, error)

func NewAPIClient added in v0.15.0

func NewAPIClient(ctx context.Context, opts ...Option) (*apiClient, error)

func NewClient added in v0.14.12

func NewClient(ctx context.Context, opts ...Option) (command.Command, error)

func ParseSecretsFromHost added in v0.15.0

func ParseSecretsFromHost(workingDir string, secrets []string) (secrets.SecretStore, error)

func PipelinePush added in v0.15.0

func PipelinePush(ctx context.Context, image string, projectDir string, apiClient *api.Client, client *http.Client, cfg *config.Config) 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, cfg *config.Config) error

func Run added in v0.0.8

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

func RunDaemon added in v0.0.8

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

func RunWithIO added in v0.0.8

func RunWithIO(ctx context.Context, dockerClient command.Command, options command.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
	Pipeline  bool
}

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) ContainerStart added in v0.14.11

func (c *DockerCommand) ContainerStart(ctx context.Context, options command.RunOptions) (string, error)

func (*DockerCommand) ContainerStop added in v0.14.8

func (c *DockerCommand) ContainerStop(ctx context.Context, containerID 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)

TODO[md]: this doesn't need to be on the interface, move to auth handler

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

func (*DockerCommand) Run added in v0.14.11

func (c *DockerCommand) Run(ctx context.Context, options command.RunOptions) error

type Option added in v0.14.12

type Option func(*clientOptions)

func WithAuthConfig added in v0.14.12

func WithAuthConfig(authConfig registry.AuthConfig) Option

func WithHost added in v0.15.10

func WithHost(host string) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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