Files
Packer-Cn/builder/docker/step_provision.go
T

27 lines
627 B
Go
Raw Normal View History

2013-11-08 23:43:41 -08:00
package docker
import (
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/common"
2013-11-08 23:43:41 -08:00
)
type StepProvision struct{}
func (s *StepProvision) Run(state multistep.StateBag) multistep.StepAction {
containerId := state.Get("container_id").(string)
tempDir := state.Get("temp_dir").(string)
// Create the communicator that talks to Docker via various
// os/exec tricks.
comm := &Communicator{
ContainerId: containerId,
HostDir: tempDir,
ContainerDir: "/packer-files",
}
prov := common.StepProvision{Comm: comm}
return prov.Run(state)
2013-11-08 23:43:41 -08:00
}
func (s *StepProvision) Cleanup(state multistep.StateBag) {}