docker

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package docker implements backend.Backend using a local Docker daemon. Each Step runs as one container; per-Task results dir is bind-mounted as /tekton/results into every Step container of the Task.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

func New

func New(opts Options) (*Backend, error)

func (*Backend) Cleanup

func (b *Backend) Cleanup(ctx context.Context) error

func (*Backend) IsRemote added in v1.7.0

func (b *Backend) IsRemote() bool

IsRemote reports the result of remote-daemon detection. Exposed for Phase 3 (volume staging) and for tests.

func (*Backend) Prepare

func (b *Backend) Prepare(ctx context.Context, run backend.RunSpec) error

func (*Backend) RunTask

type Options

type Options struct {
	// PullPolicy overrides per-step ImagePullPolicy when non-empty.
	PullPolicyOverride string
	// SidecarStartGrace is how long to wait after starting all
	// sidecars before launching the first step. Substitutes for
	// upstream Tekton's readinessProbe-driven start gate. Default
	// 2s; New() applies the default when zero.
	SidecarStartGrace time.Duration
	// SidecarStopGrace is the SIGTERM-then-SIGKILL window when
	// stopping sidecars at end of Task. Default 30s; matches
	// upstream Tekton's terminationGracePeriodSeconds.
	SidecarStopGrace time.Duration
	// Remote selects the daemon-location detection strategy:
	//
	//   "" or "auto" auto-detect via cli.Info().Name vs os.Hostname()
	//   "on"          force remote (use volume-staging path, Phase 3)
	//   "off"         force local (use bind-mount path)
	//
	// Phase 2 wires the detection only — Backend.remote is set but
	// not yet consumed by the Step/Sidecar code paths.
	Remote string

	// PauseImage overrides the per-Task pause container image used for
	// netns ownership (and, in Phase 3 remote mode, for the volume
	// stager). Empty falls back to defaultPauseImage. Air-gap users
	// point this at an internal-mirror tag like
	// "registry.internal/pause:3.9".
	PauseImage string

	// Host overrides the daemon address for this Backend. Non-empty
	// values win over $DOCKER_HOST so a single CLI invocation can
	// target a different daemon without mutating process-wide env.
	// Same scheme set as DOCKER_HOST: unix://, tcp://, ssh://.
	// Empty means "use the env" (or the moby SDK's default unix
	// socket when the env is also unset). Phase 4 surface.
	Host string
}

Jump to

Keyboard shortcuts

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