config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2017 License: Apache-2.0 Imports: 3 Imported by: 11

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(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