config

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2017 License: Apache-2.0 Imports: 3 Imported by: 4 modules, 16 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Image      string            // Image Identifier, may be different across executors.
	User       StringState       // the currently configured user for this image.
	WorkDir    StringState       // the current working directory on entering a container
	Cmd        StringSliceState  // the secondary execution form, it is provided to images if given to docker run, otherwise this is used.
	Entrypoint StringSliceState  // the primary execution form, the first arguments and the exec() jumping-off point.
	Env        []string          // Environment variables
	Volumes    []string          // Volume paths
	Labels     map[string]string // Image Labels
}

Config is a basic configuration of an image at each step. It is kept in sync by commit routines in the executor. Setting properties here will propagate them to various image-manipulating commands when needed.

func NewConfig

func NewConfig() *Config

NewConfig initializes a new configuration.

func (*Config) FromDocker

func (c *Config) FromDocker(temporary bool, cont *container.Config)

FromDocker sets *Config properties from a docker *container.Config

func (*Config) TemporaryCommand added in v0.3.2

func (c *Config) TemporaryCommand(entrypoint, cmd []string)

TemporaryCommand is used to manage run and debug statements and similar effects where the results should not be recorded in the committed container.

func (*Config) ToDocker

func (c *Config) ToDocker(temporary, tty, stdin bool) *container.Config

ToDocker outputs a docker configuration suitable for running images.

func (*Config) ToImage

func (c *Config) ToImage(layers []string) map[string]interface{}

ToImage returns the config as an image manifest.

type StringSliceState added in v0.3.2

type StringSliceState struct {
	Temporary []string
	Image     []string
}

StringSliceState is a state tracker for two types of states: image-level and temporary (run commands, etc) commands.

type StringState added in v0.3.2

type StringState struct {
	Temporary string
	Image     string
}

StringState is just like StringArrayState, but for strings.

Jump to

Keyboard shortcuts

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