devenv

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BuildkitdContainerName is the well-known name used for the local buildkitd container.
	BuildkitdContainerName = "containerhive-buildkitd"
	// BuildkitdDefaultPort is the host port the buildkitd container binds to.
	BuildkitdDefaultPort = 8372
)

Variables

This section is empty.

Functions

func ResolveImage

func ResolveImage(templateOpts map[string]string) string

ResolveImage returns the full "image:tag" for the buildkitd container resolved from template_options (ci_buildkit_image, ci_buildkit_version), falling back to project defaults.

Types

type Buildkitd

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

Buildkitd manages the lifecycle of the local buildkitd container.

func NewBuildkitd

func NewBuildkitd() (*Buildkitd, error)

NewBuildkitd creates a Buildkitd manager using Docker settings from the environment.

func (*Buildkitd) Close

func (b *Buildkitd) Close() error

Close releases the underlying Docker client.

func (*Buildkitd) Logs

func (b *Buildkitd) Logs(ctx context.Context, w io.Writer, follow bool) error

Logs streams stdout and stderr of the buildkitd container to w. When follow is true the stream stays open until ctx is cancelled or the container exits.

func (*Buildkitd) Start

func (b *Buildkitd) Start(ctx context.Context, imageRef string, hostPort int) error

Start pulls the image if absent, creates and starts the buildkitd container. Returns an error if the container is already running.

func (*Buildkitd) Status

Status returns the current state of the buildkitd container.

func (*Buildkitd) Stop

func (b *Buildkitd) Stop(ctx context.Context, remove bool) error

Stop stops the buildkitd container. It is a no-op if the container is not running or does not exist. When remove is true the container is also removed after stopping.

Jump to

Keyboard shortcuts

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