build

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: Apache-2.0 Imports: 23 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assertion added in v0.2.0

type Assertion func(*Context) error

func RequireGroupFile added in v0.2.0

func RequireGroupFile(optional bool) Assertion

func RequirePasswdFile added in v0.2.0

func RequirePasswdFile(optional bool) Assertion

type Context

type Context struct {
	ImageConfiguration types.ImageConfiguration

	Assertions []Assertion
	Options    options.Options
	// contains filtered or unexported fields
}

func New added in v0.2.0

func New(workDir string, opts ...Option) (*Context, error)

New creates a build context. The SOURCE_DATE_EPOCH env variable is supported and will overwrite the provided timestamp if present.

func (*Context) BuildImage

func (bc *Context) BuildImage() error

func (*Context) BuildLayer

func (bc *Context) BuildLayer() (string, error)

func (*Context) BuildTarball

func (bc *Context) BuildTarball() (string, error)

func (*Context) GenerateSBOM added in v0.2.0

func (bc *Context) GenerateSBOM() error

func (*Context) Refresh added in v0.2.0

func (bc *Context) Refresh() error

func (*Context) SetImplementation added in v0.3.0

func (bc *Context) SetImplementation(i buildImplementation)

func (*Context) Summarize

func (bc *Context) Summarize()

func (*Context) UpdatePrefix added in v0.2.0

func (bc *Context) UpdatePrefix()

type Option added in v0.2.0

type Option func(*Context) error

Option is an option for the build context.

func WithArch added in v0.2.0

func WithArch(arch types.Architecture) Option

WithArch sets the architecture for the build context.

func WithAssertions added in v0.2.0

func WithAssertions(a ...Assertion) Option

WithAssertions adds assertions to validate the result of this build context. Assertions are checked in parallel at the end of the build process.

func WithBuildDate added in v0.2.0

func WithBuildDate(s string) Option

WithBuildDate sets the timestamps for the build context. The string is parsed according to RFC3339. An empty string is a special case and will default to the unix epoch.

func WithConfig added in v0.2.0

func WithConfig(configFile string) Option

WithConfig sets the image configuration for the build context. The image configuration is parsed from given config file.

func WithExtraKeys added in v0.2.0

func WithExtraKeys(keys []string) Option

func WithExtraRepos added in v0.2.0

func WithExtraRepos(repos []string) Option

func WithImageConfiguration added in v0.2.0

func WithImageConfiguration(ic types.ImageConfiguration) Option

WithImageConfiguration sets the ImageConfiguration object to use when building.

func WithProot added in v0.2.0

func WithProot(enable bool) Option

WithProot enables proot for rootless image builds.

func WithSBOM added in v0.2.0

func WithSBOM(path string) Option

func WithSBOMFormats added in v0.2.0

func WithSBOMFormats(formats []string) Option

func WithTags added in v0.2.0

func WithTags(tags ...string) Option

WithTags sets the tags for the build context.

func WithTarball added in v0.2.0

func WithTarball(path string) Option

WithTarball sets the output path of the layer tarball.

type Options added in v0.3.0

type Options struct {
	WantSBOM        bool
	UseProot        bool
	WorkDir         string
	TarballPath     string
	Tags            []string
	SourceDateEpoch time.Time
	SBOMPath        string
	SBOMFormats     []string
	ExtraKeyFiles   []string
	ExtraRepos      []string
	Arch            types.Architecture
	Log             *log.Logger
}

func (*Options) Summarize added in v0.3.0

func (o *Options) Summarize()

type PathMutator added in v0.3.0

type PathMutator func(*options.Options, types.PathMutation) error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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