build

package
v0.0.0-...-9e06024 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// MobyDir is the location of the cache directory, defaults to ~/.moby
	MobyDir = defaultMobyConfigDir()
)

Functions

func Build

func Build(m moby.Moby, w io.Writer, opts BuildOpts) error

Build performs the actual build process. The output is the filesystem in a tar stream written to w.

func Formats

func Formats(base string, image string, formats []string, size int, arch, cache string) error

Formats generates all the specified output formats

func ImageBundle

func ImageBundle(prefix, location string, ref *reference.Spec, config []byte, runtime moby.Runtime, tw tarWriter, readonly bool, dupMap map[string]string, opts BuildOpts) error

ImageBundle produces an OCI bundle at the given path in a tarball, given an image and a config.json

func ImageTar

func ImageTar(location string, ref *reference.Spec, prefix string, tw tarWriter, resolv string, opts BuildOpts) (e error)

ImageTar takes a Docker image and outputs it to a tar stream location is where it is in the linuxkit.yaml file

func OutputTypes

func OutputTypes() []string

OutputTypes returns a list of the valid output types

func Streamable

func Streamable(t string) bool

Streamable returns true if an output can be streamed

func ValidateFormats

func ValidateFormats(formats []string, cache string) error

ValidateFormats checks if the format type is known

Types

type BuildOpts

type BuildOpts struct {
	Pull             bool
	BuilderType      string
	DecompressKernel bool
	CacheDir         string
	DockerCache      bool
	Arch             string
	SbomGenerator    *SbomGenerator
	InputTar         string
}

BuildOpts options that control the linuxkit build process

type SbomGenerator

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

SbomGenerator handler for generating sbom

func NewSbomGenerator

func NewSbomGenerator(filename string, currentBuildTime bool) (*SbomGenerator, error)

func (*SbomGenerator) Add

func (s *SbomGenerator) Add(prefix string, sbom io.ReadCloser) error

func (*SbomGenerator) Close

func (s *SbomGenerator) Close(tw *tar.Writer) error

Close finalize generation of the sbom, including merging any together and writing the output file to a tar stream, and cleaning up any temporary files.

Jump to

Keyboard shortcuts

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