backend

package
v0.0.0-...-3f2397b Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: GPL-3.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// ImgBackend is retained as a deprecated alias for BuildahBackend.
	// genuinetools/img is unmaintained; see the buildah backend design.
	ImgBackend     = "img"
	BuildahBackend = "buildah"
	DockerBackend  = "docker"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendWriter

type BackendWriter struct {
	BufferedOutput bool
	Buffer         *bytes.Buffer
	// contains filtered or unexported fields
}

func NewBackendWriter

func NewBackendWriter(buffered bool, ctx types.Context) *BackendWriter

func (*BackendWriter) Close

func (b *BackendWriter) Close() error

func (*BackendWriter) GetCombinedOutput

func (b *BackendWriter) GetCombinedOutput() string

func (*BackendWriter) Write

func (b *BackendWriter) Write(p []byte) (int, error)

type Options

type Options struct {
	ImageName      string
	SourcePath     string
	DockerFileName string
	Destination    string
	Context        string
	BackendArgs    []string
}

type SimpleBuildah

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

func NewSimpleBuildahBackend

func NewSimpleBuildahBackend(ctx types.Context) *SimpleBuildah

func (*SimpleBuildah) BuildImage

func (s *SimpleBuildah) BuildImage(opts Options) error

func (*SimpleBuildah) CopyImage

func (s *SimpleBuildah) CopyImage(src, dst string) error

func (*SimpleBuildah) DownloadImage

func (s *SimpleBuildah) DownloadImage(opts Options) error

func (*SimpleBuildah) ExportImage

func (s *SimpleBuildah) ExportImage(opts Options) error

func (*SimpleBuildah) ImageAvailable

func (*SimpleBuildah) ImageAvailable(imagename string) bool

func (*SimpleBuildah) ImageDefinitionToTar

func (s *SimpleBuildah) ImageDefinitionToTar(opts Options) error

func (*SimpleBuildah) ImageExists

func (s *SimpleBuildah) ImageExists(imagename string) bool

ImageExists reports whether the image is present locally. It uses buildah inspect rather than matching against the output of buildah images: the img backend used strings.Contains over `img ls`, which false-positives on any name containing the queried name as a substring.

func (*SimpleBuildah) ImageReference

func (s *SimpleBuildah) ImageReference(a string, ondisk bool) (v1.Image, error)

ImageReference returns a go-containerregistry handle on the image. buildah has no daemon to query, so ondisk is ignored and the image is always routed through a docker-archive on disk.

func (*SimpleBuildah) LoadImage

func (s *SimpleBuildah) LoadImage(path string) error

LoadImage imports a docker-archive produced by ExportImage. The img backend could not do this at all, which is why create-repo --type docker did not work on the daemonless path.

func (*SimpleBuildah) Push

func (s *SimpleBuildah) Push(opts Options) error

func (*SimpleBuildah) RemoveImage

func (s *SimpleBuildah) RemoveImage(opts Options) error

type SimpleDocker

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

func NewSimpleDockerBackend

func NewSimpleDockerBackend(ctx types.Context) *SimpleDocker

func (*SimpleDocker) BuildImage

func (s *SimpleDocker) BuildImage(opts Options) error

TODO: Missing still: labels, and build args expansion

func (*SimpleDocker) CopyImage

func (s *SimpleDocker) CopyImage(src, dst string) error

func (*SimpleDocker) DownloadImage

func (s *SimpleDocker) DownloadImage(opts Options) error

func (*SimpleDocker) ExportImage

func (s *SimpleDocker) ExportImage(opts Options) error

func (*SimpleDocker) ImageAvailable

func (*SimpleDocker) ImageAvailable(imagename string) bool

func (*SimpleDocker) ImageDefinitionToTar

func (s *SimpleDocker) ImageDefinitionToTar(opts Options) error

func (*SimpleDocker) ImageExists

func (s *SimpleDocker) ImageExists(imagename string) bool

func (*SimpleDocker) ImageReference

func (s *SimpleDocker) ImageReference(a string, ondisk bool) (v1.Image, error)

func (*SimpleDocker) LoadImage

func (s *SimpleDocker) LoadImage(path string) error

func (*SimpleDocker) Push

func (s *SimpleDocker) Push(opts Options) error

func (*SimpleDocker) RemoveImage

func (s *SimpleDocker) RemoveImage(opts Options) error

Jump to

Keyboard shortcuts

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