docker

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package docker runs renovate as containers against a local Docker daemon.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	ImagePull(ctx context.Context, ref string, opts image.PullOptions) (io.ReadCloser, error)
	ContainerCreate(ctx context.Context, cfg *container.Config, host *container.HostConfig,
		netCfg *network.NetworkingConfig, platform *ocispec.Platform, name string) (container.CreateResponse, error)
	ContainerStart(ctx context.Context, id string, opts container.StartOptions) error
	ContainerWait(ctx context.Context, id string, cond container.WaitCondition) (<-chan container.WaitResponse, <-chan error)
	ContainerLogs(ctx context.Context, id string, opts container.LogsOptions) (io.ReadCloser, error)
	ContainerRemove(ctx context.Context, id string, opts container.RemoveOptions) error
}

API is the subset of the Docker SDK the executor needs; *client.Client satisfies it, tests use a fake.

func NewAPIFromEnv

func NewAPIFromEnv() (API, error)

NewAPIFromEnv creates a Docker client from DOCKER_HOST etc.

type Executor

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

Executor runs renovate containers via the Docker API.

func New

func New(cfg config.Executor, api API, log *slog.Logger) *Executor

New builds a docker Executor from its config section.

func (*Executor) Name

func (e *Executor) Name() string

Name returns the executor's configured name.

func (*Executor) Run

func (e *Executor) Run(ctx context.Context, spec executor.RunSpec) error

Run creates, starts and awaits a renovate container for spec; the container is force-removed afterwards even on cancellation.

Jump to

Keyboard shortcuts

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