Commit 74a4f27a authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

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

parent 2e2f59a8
......@@ -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]
......
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment