Documentation ¶
Index ¶
- Constants
- func LXDCommand(args ...string) (string, error)
- func ShellCommand(command string) *exec.Cmd
- type Artifact
- type Builder
- type CommandWrapper
- type Communicator
- func (c *Communicator) Download(src string, w io.Writer) error
- func (c *Communicator) DownloadDir(src string, dst string, exclude []string) error
- func (c *Communicator) Execute(commandString string) (*exec.Cmd, error)
- func (c *Communicator) Start(cmd *packer.RemoteCmd) error
- func (c *Communicator) Upload(dst string, r io.Reader, fi *os.FileInfo) error
- func (c *Communicator) UploadDir(dst string, src string, exclude []string) error
- type Config
- type StepProvision
Constants ¶
View Source
const BuilderId = "lxd"
The unique ID for this builder
Variables ¶
This section is empty.
Functions ¶
func LXDCommand ¶
Yeah...LXD calls `lxc` because the command line is different between the packages. This should also avoid a naming collision between the LXC builder.
func ShellCommand ¶
ShellCommand takes a command string and returns an *exec.Cmd to execute it within the context of a shell (/bin/sh).
Types ¶
type CommandWrapper ¶
CommandWrapper is a type that given a command, will possibly modify that command in-flight. This might return an error.
type Communicator ¶
type Communicator struct { ContainerName string CmdWrapper CommandWrapper }
func (*Communicator) DownloadDir ¶
func (c *Communicator) DownloadDir(src string, dst string, exclude []string) error
func (*Communicator) Execute ¶
func (c *Communicator) Execute(commandString string) (*exec.Cmd, error)
type Config ¶
type Config struct { common.PackerConfig `mapstructure:",squash"` OutputImage string `mapstructure:"output_image"` ContainerName string `mapstructure:"container_name"` CommandWrapper string `mapstructure:"command_wrapper"` Image string `mapstructure:"image"` Profile string `mapstructure:"profile"` InitSleep string `mapstructure:"init_sleep"` PublishProperties map[string]string `mapstructure:"publish_properties"` LaunchConfig map[string]string `mapstructure:"launch_config"` // contains filtered or unexported fields }
type StepProvision ¶
type StepProvision struct{}
StepProvision provisions the container
func (*StepProvision) Cleanup ¶
func (s *StepProvision) Cleanup(state multistep.StateBag)
func (*StepProvision) Run ¶
func (s *StepProvision) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
Click to show internal directories.
Click to hide internal directories.