buildkit

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: AGPL-3.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildKit

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

BuildKit is a wrapper around BuildKit that provides a simplified interface for building OCI images using BuildKit running in a Docker container.

func New

func New(name, certsDir string) *BuildKit

New creates a new BuildKit instance.

func (*BuildKit) Build

func (b *BuildKit) Build(ctx context.Context, opts BuildOptions) error

Build builds an OCI image tarball using BuildKit.

func (*BuildKit) StartDaemon

func (b *BuildKit) StartDaemon(ctx context.Context) error

StartDaemon starts the BuildKit daemon in a Docker container (if it is not already running).

func (*BuildKit) StopDaemon

func (b *BuildKit) StopDaemon(ctx context.Context) error

StopDaemon stops the BuildKit daemon running in a Docker container.

type BuildOptions added in v0.9.0

type BuildOptions struct {
	// OCIArchivePath is the path to the output OCI image tarball.
	OCIArchivePath string
	// RecipePath is the path to the debco recipe file.
	RecipePath string
	// SourceDateEpoch is the source date epoch for the image.
	SourceDateEpoch time.Time
	// SecondStageBinaryPath optionally overrides the path to the second-stage binary.
	SecondStageBinaryPath string
	// ImageConf is the optional OCI image configuration.
	ImageConf ocispecs.ImageConfig
	// Tags is a list of tags to apply to the image.
	Tags []string
	// PlatformOpts is a list of platform build options.
	PlatformOpts []PlatformBuildOptions
}

type PlatformBuildOptions added in v0.9.0

type PlatformBuildOptions struct {
	// Platform is the platform to build the image for.
	Platform ocispecs.Platform
	// BuildContextDir is the path to the build context directory.
	BuildContextDir string
	// DpkgConfArchivePath is the path to the dpkg configuration archive.
	// The path must be relative to the build context directory.
	DpkgConfArchivePath string
	// DataArchivePaths is a list of paths to package data archives.
	// The paths must be relative to the build context directory.
	DataArchivePaths []string
}

Directories

Path Synopsis
Package exptypes from buildkit is not available in the Debian bookworm docker-dev package.
Package exptypes from buildkit is not available in the Debian bookworm docker-dev package.

Jump to

Keyboard shortcuts

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