command

package
v0.0.0-...-67d9101 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2017 License: Apache-2.0 Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package command - command for the box builder

Documentation is deliberately simple here, it maps directly to the verbs and functions in the box builder documentation: https://box-builder.github.io/box. Duplicating it here seems pointless.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoImage = errors.New("no image base specified")

ErrNoImage reports when the image cannot be used because it was not specified.

Functions

func ResetPulls

func ResetPulls()

ResetPulls is a function to facilitate testing of the coordinated pull functionality.

Types

type Interpreter

type Interpreter struct {
	CacheKey string // if set to "", does not consider cache next step
	// contains filtered or unexported fields
}

Interpreter is a set of statements combined with an executor used to compose images. It is driven by an evaluator.

func NewInterpreter

func NewInterpreter(globals *types.Global, exec executor.Executor, vars map[string]string) *Interpreter

NewInterpreter contypes a new *Interpreter.

func (*Interpreter) Cmd

func (i *Interpreter) Cmd(cmds []string) error

Cmd corresponds to the `cmd` verb.

func (*Interpreter) Copy

func (i *Interpreter) Copy(source, target string, ignoreList []string) error

Copy implements `copy`

func (*Interpreter) Debug

func (i *Interpreter) Debug(shell string) error

Debug corresponds to the `debug` verb.

func (*Interpreter) Entrypoint

func (i *Interpreter) Entrypoint(stringArgs []string) error

Entrypoint is the `entrypoint` verb.

func (*Interpreter) Env

func (i *Interpreter) Env(env map[string]string) error

Env corresponds to the `env` verb.

func (*Interpreter) Flatten

func (i *Interpreter) Flatten() error

Flatten implements `flatten`

func (*Interpreter) From

func (i *Interpreter) From(image string) error

From corresponds to the `from` verb.

func (*Interpreter) GetEnv

func (i *Interpreter) GetEnv(arg string) string

GetEnv gets a value from the local environment.

func (*Interpreter) GetGID

func (i *Interpreter) GetGID(id string) (string, error)

GetGID gets the GID for a group inside the container image currently in process.

func (*Interpreter) GetUID

func (i *Interpreter) GetUID(id string) (string, error)

GetUID gets the UID for a user inside the container image currently in process.

func (*Interpreter) Inside

func (i *Interpreter) Inside(p string, run func() error) error

Inside is the `inside` verb.

func (*Interpreter) Label

func (i *Interpreter) Label(labelMap map[string]string) error

Label corresponds to the `label` verb.

func (*Interpreter) Read

func (i *Interpreter) Read(filename string) (string, error)

Read reads a file from inside the container, and returns its contents.

func (*Interpreter) Run

func (i *Interpreter) Run(command string, showRun bool) error

Run corresponds to the `run` verb

func (*Interpreter) Save

func (i *Interpreter) Save(file, kind, tag string) error

Save corresponds to the `save` func.

func (*Interpreter) SetExec

func (i *Interpreter) SetExec(execTargets map[string][]string) error

SetExec corresponds to the `set_exec` verb.

func (*Interpreter) Skip

func (i *Interpreter) Skip(run func() error) error

Skip is the `skip` function.

func (*Interpreter) Tag

func (i *Interpreter) Tag(name string) error

Tag is the `tag` verb.

func (*Interpreter) User

func (i *Interpreter) User(username string) error

User is the `user` verb.

func (*Interpreter) Var

func (i *Interpreter) Var(key string) (string, error)

Var corresponds to the `var` func.

func (*Interpreter) VarExists

func (i *Interpreter) VarExists(key string) bool

VarExists corresponds to the `var_exists` func.

func (*Interpreter) WithUser

func (i *Interpreter) WithUser(username string, run func() error) error

WithUser is the `with_user` verb.

func (*Interpreter) WorkDir

func (i *Interpreter) WorkDir(dir string) error

WorkDir is the `workdir` verb.

Jump to

Keyboard shortcuts

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