buidler/docker: remove container [GH-1206] [GH-1095]

This commit is contained in:
Mitchell Hashimoto 2014-09-04 17:03:24 -07:00
parent 2e2f59a87b
commit 74a4f27a16
2 changed files with 6 additions and 1 deletions

View File

@ -32,6 +32,7 @@ BUG FIXES:
* builder/amazon/all: `delete_on_termination` set to false will work.
* builder/amazon/all: More desctriptive error messages if Amazon only
sends an error code. [GH-1189]
* builder/docker: Remove the container during cleanup. [GH-1206]
* builder/googlecompute: add `disk_size` option. [GH-1397]
* builder/openstack: Region is not required. [GH-1418]
* builder/parallels-iso: ISO not removed from VM after install [GH-1338]

View File

@ -149,7 +149,11 @@ func (d *DockerDriver) StartContainer(config *ContainerConfig) (string, error) {
}
func (d *DockerDriver) StopContainer(id string) error {
return exec.Command("docker", "kill", id).Run()
if err := exec.Command("docker", "kill", id).Run(); err != nil {
return err
}
return exec.Command("docker", "rm", id).Run()
}
func (d *DockerDriver) Verify() error {