Documentation ¶
Index ¶
- Constants
- Variables
- type ACBuild
- func (a *ACBuild) AddAnnotation(name, value string) (err error)
- func (a *ACBuild) AddDependency(imageName types.ACIdentifier, imageId *types.Hash, labels types.Labels, ...) (err error)
- func (a *ACBuild) AddEnv(name, value string) (err error)
- func (a *ACBuild) AddIsolator(name string, value []byte) (err error)
- func (a *ACBuild) AddLabel(name, value string) (err error)
- func (a *ACBuild) AddMount(name, path string, readOnly bool) (err error)
- func (a *ACBuild) AddPort(name, protocol string, port, count uint, socketActivated bool) (err error)
- func (a *ACBuild) Begin(start string, insecure bool, mode BuildMode) (err error)
- func (a *ACBuild) CopyToDir(froms []string, to string) (err error)
- func (a *ACBuild) CopyToTarget(from string, to string) (err error)
- func (a *ACBuild) End() error
- func (a *ACBuild) GetAnnotations() (m map[string]string, err error)
- func (a *ACBuild) NewLayer() (err error)
- func (a *ACBuild) Print(w io.Writer, prettyPrint, printConfig bool) (err error)
- func (a *ACBuild) RemoveAnnotation(name string) (err error)
- func (a *ACBuild) RemoveDependency(imageName string) (err error)
- func (a *ACBuild) RemoveEnv(name string) (err error)
- func (a *ACBuild) RemoveIsolator(imageName string) (err error)
- func (a *ACBuild) RemoveLabel(name string) (err error)
- func (a *ACBuild) RemoveMount(name string) (err error)
- func (a *ACBuild) RemovePort(name string) (err error)
- func (a *ACBuild) Replace(manifestPath string) (err error)
- func (a *ACBuild) Run(cmd []string, workingDir string, insecure bool, runEngine engine.Engine) (err error)
- func (a *ACBuild) SetExec(cmd []string) (err error)
- func (a *ACBuild) SetGroup(group string) (err error)
- func (a *ACBuild) SetName(name string) (err error)
- func (a *ACBuild) SetPostStop(exec []string) (err error)
- func (a *ACBuild) SetPreStart(exec []string) (err error)
- func (a *ACBuild) SetSuppGroups(groups []int) (err error)
- func (a *ACBuild) SetTag(tag string) (err error)
- func (a *ACBuild) SetUser(user string) (err error)
- func (a *ACBuild) SetWorkingDir(dir string) (err error)
- func (a *ACBuild) Write(output string, overwrite bool) (id string, err error)
- type BuildMode
- type Manifest
- type OCILayout
Constants ¶
const ( BuildModeAppC = BuildMode("appc") BuildModeOCI = BuildMode("oci") )
const OCISchemaVersion = 2
Variables ¶
var AppcVersion = schema.AppContainerVersion
var OCILayoutValue = OCILayout{"1.0.0"}
var Version = "0.0.0+was-not-built-correctly"
Functions ¶
This section is empty.
Types ¶
type ACBuild ¶
type ACBuild struct { ContextPath string LockPath string CurrentImagePath string DepStoreTarPath string DepStoreExpandedPath string OverlayTargetPath string OverlayWorkPath string BuildModePath string OCIExpandedBlobsPath string Debug bool Mode BuildMode // contains filtered or unexported fields }
ACBuild contains all the information for a current build. Once an ACBuild has been created, the functions available on it will perform different actions in the build, like updating a dependency or writing a finished ACI.
func NewACBuild ¶
NewACBuild returns a new ACBuild struct with sane defaults for all of the different paths
func (*ACBuild) AddAnnotation ¶
func (*ACBuild) AddDependency ¶
func (*ACBuild) Begin ¶
Begin will start a new build, storing the untarred image the build operates on at a.CurrentImagePath. If start is the empty string, the build will begin with an empty image, otherwise the image stored at start will be used at the starting point. The mode parameter specifies whether this is starting with an AppC or OCI image.
func (*ACBuild) CopyToDir ¶
CopyToDir will copy all elements specified in the froms slice into the directory inside the current ACI specified by the to string.
func (*ACBuild) CopyToTarget ¶
CopyToTarget will copy a single file/directory from the from string to the path specified by the to string inside the current ACI.
func (*ACBuild) End ¶
End will stop the current build. An error will be returned if no build is in progress.
func (*ACBuild) GetAnnotations ¶
func (*ACBuild) RemoveAnnotation ¶
func (*ACBuild) RemoveDependency ¶
func (*ACBuild) RemoveIsolator ¶
func (*ACBuild) RemoveLabel ¶
func (*ACBuild) RemoveMount ¶
func (*ACBuild) RemovePort ¶
func (*ACBuild) Run ¶
func (a *ACBuild) Run(cmd []string, workingDir string, insecure bool, runEngine engine.Engine) (err error)
Run will execute the given command in the ACI being built. a.CurrentImagePath is where the untarred ACI is stored, a.DepStoreTarPath is the directory to download dependencies into, a.DepStoreExpandedPath is where the dependencies are expanded into, and a.OverlayWorkPath is the work directory used by overlayfs.
Arguments:
- cmd: The command to run and its arguments.
- workingDir: If specified, the current directory inside the container is changed to its value before running the given command.
- runEngine: The engine used to perform the execution of the command.
func (*ACBuild) SetPostStop ¶
func (*ACBuild) SetPreStart ¶
func (*ACBuild) SetSuppGroups ¶
func (*ACBuild) SetWorkingDir ¶
type BuildMode ¶
type BuildMode string
BuildMode represents which image spec is being followed during a build, AppC or OCI
func GetBuildMode ¶
type Manifest ¶
type Manifest interface { Print(w io.Writer, prettyPrint, printConfig bool) error // Print out this manifest to the given writer GetAnnotations() (map[string]string, error) // Used to generate build history AddAnnotation(name, value string) error AddEnv(name, value string) error AddLabel(name, value string) error AddMount(name, path string, readOnly bool) error AddPort(name, protocol string, port, count uint, socketActivated bool) error RemoveAnnotation(name string) error RemoveEnv(name string) error RemoveLabel(name string) error RemoveMount(name string) error RemovePort(name string) error Replace(manifestPath string) error SetExec(cmd []string) error SetGroup(group string) error SetUser(user string) error SetWorkingDir(dir string) error SetTag(tag string) error }
Manifest defines something that can manipulate manifests. The functions contained in it are the common subset of fields between appc and oci that can be altered by a user.