types

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

type Bundle struct {
	// FSObjects is a map of the filesystem objects contained in the Bundle. An object
	// will be built as one section of a SIF file.
	//
	// Known FSObjects labels:
	//   * rootfs -> root file system
	//   * .singularity.d -> .singularity.d directory (includes image exec scripts)
	//   * data -> directory containing data files
	FSObjects   map[string]string `json:"fsObjects"`
	JSONObjects map[string][]byte `json:"jsonObjects"`
	Recipe      Definition        `json:"rawDeffile"`
	BindPath    []string          `json:"bindPath"`
	Path        string            `json:"bundlePath"`
	Opts        Options           `json:"opts"`
}

Bundle is the temporary build environment used during the image building process. A Bundle is the programmatic representation of the directory structure which will constitute this environmenb. /tmp/...:

fs/ - A chroot filesystem
.singularity.d/ - Container metadata (from 2.x image format)
config.json (optional) - Contain information for OCI image bundle
etc... - The Bundle dir can theoretically contain arbitrary directories,
         files, etc... which can be interpreted by the Chef

func NewBundle

func NewBundle(bundleDir, bundlePrefix string) (b *Bundle, err error)

NewBundle creates a Bundle environment

func (*Bundle) Rootfs

func (b *Bundle) Rootfs() string

Rootfs give the path to the root filesystem in the Bundle

func (Bundle) RunSection

func (b Bundle) RunSection(s string) bool

RunSection iterates through the sections specified in a bundle and returns true if the given string, s, is a section of the definition that should be executed during the build process

type Options

type Options struct {
	// sections are the parts of the definition to run during the build
	Sections []string `json:"sections"`
	// TmpDir specifies a non-standard temporary location to perform a build
	TmpDir string
	// LibraryURL contains URL to library where base images can be pulled
	LibraryURL string `json:"libraryURL"`
	// LibraryAuthToken contains authentication token to access specified library
	LibraryAuthToken string `json:"libraryAuthToken"`
	// contains docker credentials if specified
	DockerAuthConfig *ocitypes.DockerAuthConfig
	// noTest indicates if build should skip running the test script
	NoTest bool `json:"noTest"`
	// force automatically deletes an existing container at build destination while performing build
	Force bool `json:"force"`
	// update detects and builds using an existing sandbox container at build destination
	Update bool `json:"update"`
	// noHTTPS
	NoHTTPS bool `json:"noHTTPS"`
	// NoCleanUp allows a user to prevent a bundle from being cleaned up after a failed build
	// useful for debugging
	NoCleanUp bool `json:"noCleanUp"`
}

Options defines build time behavior to be executed on the bundle

Jump to

Keyboard shortcuts

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