dockerfile

package
v0.0.0-...-24aced8 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2015 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

View Source
const BuilderId = "packer.post-processor.docker-dockerfile"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	common.PackerConfig `mapstructure:",squash"`

	From       string
	Maintainer string            `mapstructure:"maintainer"`
	Cmd        interface{}       `mapstructure:"cmd"`
	Label      map[string]string `mapstructure:"label"`
	Expose     []string          `mapstructure:"expose"`
	Env        map[string]string `mapstructure:"env"`
	Entrypoint interface{}       `mapstructure:"entrypoint"`
	Volume     []string          `mapstructure:"volume"`
	User       string            `mapstructure:"user"`
	WorkDir    string            `mapstructure:"workdir"`
	// contains filtered or unexported fields
}

type DockerDriver

type DockerDriver struct {
	*docker.DockerDriver
}

func (*DockerDriver) BuildImage

func (d *DockerDriver) BuildImage(dockerfile *bytes.Buffer) (string, error)

type Driver

type Driver interface {
	docker.Driver

	// Build an image with the given Dockerfile and returns the ID for that image,
	// along with a potential error.
	BuildImage(dockerfile *bytes.Buffer) (string, error)
}

Driver is the interface that has to be implemented to communicate with Docker. The Driver interface also allows the steps to be tested since a mock driver can be shimmed in.

type MockDriver

type MockDriver struct {
	*docker.MockDriver

	BuildImageCalled     bool
	BuildImageDockerfile *bytes.Buffer
	BuildImageErr        error
}

MockDriver is a driver implementation that can be used for tests.

func (*MockDriver) BuildImage

func (d *MockDriver) BuildImage(dockerfile *bytes.Buffer) (string, error)

type PostProcessor

type PostProcessor struct {
	Driver Driver
	// contains filtered or unexported fields
}

func (*PostProcessor) Configure

func (p *PostProcessor) Configure(raws ...interface{}) error

func (*PostProcessor) PostProcess

func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (packer.Artifact, bool, error)

Jump to

Keyboard shortcuts

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