builder

package
v0.13.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: 13 Imported by: 0

Documentation

Overview

Package builder provides an implementation of container.Builder and container.Container leveraging containerd.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(options ...Option) (container.Builder, error)

New creates a new docker container builder.

Types

type ImagePullPolicy

type ImagePullPolicy int

ImagePullPolicy is the policy defining how to pull an image.

const (
	// ImagePullPolicyAlways specifies that the image must always be pulled from remote.
	ImagePullPolicyAlways ImagePullPolicy = iota
	// ImagePullPolicyNever specifies that the image must always be searched from the locally available images.
	ImagePullPolicyNever
	// ImagePullPolicyIfNotPresent specifies that the image must be pull from remote only if it not locally available.
	ImagePullPolicyIfNotPresent
)

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option for configuring the container builder.

func WithBaseImageName

func WithBaseImageName(baseImage string) Option

WithBaseImageName allows to specify the name of the base image used to create the container.

func WithBaseImagePullPolicy

func WithBaseImagePullPolicy(policy ImagePullPolicy) Option

WithBaseImagePullPolicy allows to specify the pull policy for obtaining the base image.

func WithUnixSocketURL

func WithUnixSocketURL(unixSocketURL string) Option

WithUnixSocketURL allows to specify the unix socket URL of the local container runtime server. E.g.: unix:///run/docker.sock.

Jump to

Keyboard shortcuts

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