build

package
v4.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: BSD-3-Clause Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeAllDefs

func MakeAllDefs(spec string, buildArgsMap map[string]string) ([]types.Definition, error)

MakeAllDefs gets a definition object from a spec

Types

type Assembler

type Assembler interface {
	Assemble(*types.Bundle, string) error
}

Assembler is responsible for assembling an image from a bundle. For example a bundle may be holding multiple file systems intended to be separate partitions within a SIF image. The assembler would need to detect these directories and make sure it properly assembles the SIF with them as partitions.

type Build

type Build struct {

	// Conf contains cross stage build configuration.
	Conf Config
	// contains filtered or unexported fields
}

Build is an abstracted way to look at the entire build process. For example calling NewBuild() will return this object. From there we can call Full() on this build object, which will:

  • Call Bundle() to obtain all data needed to execute the specified build locally on the machine
  • Execute all of a definition using AllSections()
  • And finally call Assemble() to create our container image

func New

func New(defs []types.Definition, conf Config) (*Build, error)

New creates a new build struct form a slice of definitions.

func NewBuild

func NewBuild(spec string, conf Config) (*Build, error)

NewBuild creates a new Build struct from a spec (URI, definition file, etc...).

func (*Build) Full

func (b *Build) Full(ctx context.Context) error

Full runs a standard build from start to finish.

type Config

type Config struct {
	// Dest is the location for container after build is complete.
	Dest string
	// Format is the format of built container, e.g. SIF, sandbox.
	Format string
	// NoCleanUp allows a user to prevent a bundle from being cleaned
	// up after a failed build, useful for debugging.
	NoCleanUp bool
	// Opts for bundles.
	Opts types.Options
}

Config defines how build is executed, including things like where final image is written.

type Conveyor

type Conveyor interface {
	Get(context.Context, *types.Bundle) error
}

Conveyor is responsible for downloading from remote sources (library, shub, docker...).

type ConveyorPacker

type ConveyorPacker interface {
	Conveyor
	Packer
}

ConveyorPacker describes an interface that a ConveyorPacker type must implement.

func NewConveyorPacker

func NewConveyorPacker(def types.Definition) (ConveyorPacker, error)

NewConveyorPacker returns a valid ConveyorPacker for the given image definition.

type Packer

type Packer interface {
	Pack(context.Context) (*types.Bundle, error)
}

Packer is the type which is responsible for installing the chroot directory, metadata directory, and potentially other files/directories within the Bundle.

Directories

Path Synopsis
Package apps [apps-plugin] provides the functions which are necessary for adding SCI-F apps support to Singularity 3.0.0.
Package apps [apps-plugin] provides the functions which are necessary for adding SCI-F apps support to Singularity 3.0.0.
buildkit

Jump to

Keyboard shortcuts

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