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
Click to show internal directories.
Click to hide internal directories.