config

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: 3 Imported by: 0

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

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

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

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

type StringState

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