Documentation ¶
Index ¶
- type Assertion
- type Context
- func (bc *Context) BuildImage() error
- func (bc *Context) BuildLayer() (string, error)
- func (bc *Context) BuildTarball() (string, error)
- func (bc *Context) FixateApkWorld() error
- func (bc *Context) GenerateSBOM() error
- func (bc *Context) InitApkDB() error
- func (bc *Context) InitApkKeyring() (err error)
- func (bc *Context) InitApkRepositories() error
- func (bc *Context) InitApkWorld() error
- func (bc *Context) InstallBusyboxSymlinks() error
- func (bc *Context) MutateAccounts() error
- func (bc *Context) Refresh() error
- func (bc *Context) Summarize()
- func (bc *Context) UpdatePrefix()
- type Option
- func WithArch(arch types.Architecture) Option
- func WithAssertions(a ...Assertion) Option
- func WithBuildDate(s string) Option
- func WithConfig(configFile string) Option
- func WithExtraKeys(keys []string) Option
- func WithExtraRepos(repos []string) Option
- func WithImageConfiguration(ic types.ImageConfiguration) Option
- func WithProot(enable bool) Option
- func WithSBOM(path string) Option
- func WithSBOMFormats(formats []string) Option
- func WithTags(tags ...string) Option
- func WithTarball(path string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assertion ¶ added in v0.2.0
func RequireGroupFile ¶ added in v0.2.0
func RequirePasswdFile ¶ added in v0.2.0
type Context ¶
type Context struct { ImageConfiguration types.ImageConfiguration WorkDir string TarballPath string UseProot bool Tags []string SourceDateEpoch time.Time Assertions []Assertion WantSBOM bool SBOMPath string SBOMFormats []string ExtraKeyFiles []string ExtraRepos []string Arch types.Architecture Log *log.Logger // contains filtered or unexported fields }
func New ¶ added in v0.2.0
New creates a build context. The SOURCE_DATE_EPOCH env variable is supported and will overwrite the provided timestamp if present.
func (*Context) BuildImage ¶
Builds the image in Context.WorkDir.
func (*Context) BuildLayer ¶
func (*Context) BuildTarball ¶
func (*Context) FixateApkWorld ¶
Force apk's resolver to re-resolve the requested dependencies in /etc/apk/world.
func (*Context) GenerateSBOM ¶ added in v0.2.0
GenerateSBOM runs the sbom generation
func (*Context) InitApkDB ¶
Initialize the APK database for a given build context. It is assumed that the build context itself is properly set up, and that `bc.WorkDir` is set to the path of a working directory.
func (*Context) InitApkKeyring ¶
Installs the specified keys into the APK keyring inside the build context.
func (*Context) InitApkRepositories ¶
Generates a specified /etc/apk/repositories file in the build context.
func (*Context) InitApkWorld ¶
Generates a specified /etc/apk/world file in the build context.
func (*Context) InstallBusyboxSymlinks ¶ added in v0.2.0
Installs the BusyBox symlinks, if appropriate.
func (*Context) MutateAccounts ¶ added in v0.2.0
func (*Context) UpdatePrefix ¶ added in v0.2.0
func (bc *Context) UpdatePrefix()
type Option ¶ added in v0.2.0
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
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
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
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 WithExtraRepos ¶ added in v0.2.0
func WithImageConfiguration ¶ added in v0.2.0
func WithImageConfiguration(ic types.ImageConfiguration) Option
WithImageConfiguration sets the ImageConfiguration object to use when building.
func WithSBOMFormats ¶ added in v0.2.0
func WithTarball ¶ added in v0.2.0
WithTarball sets the output path of the layer tarball.