github.com/sneal/packer@v0.5.2/builder/docker/step_provision.go (about) 1 package docker 2 3 import ( 4 "github.com/mitchellh/multistep" 5 "github.com/mitchellh/packer/common" 6 ) 7 8 type StepProvision struct{} 9 10 func (s *StepProvision) Run(state multistep.StateBag) multistep.StepAction { 11 containerId := state.Get("container_id").(string) 12 tempDir := state.Get("temp_dir").(string) 13 14 // Create the communicator that talks to Docker via various 15 // os/exec tricks. 16 comm := &Communicator{ 17 ContainerId: containerId, 18 HostDir: tempDir, 19 ContainerDir: "/packer-files", 20 } 21 22 prov := common.StepProvision{Comm: comm} 23 return prov.Run(state) 24 } 25 26 func (s *StepProvision) Cleanup(state multistep.StateBag) {}