Skip to content
This repository has been archived by the owner on Mar 30, 2020. It is now read-only.

Commit

Permalink
fix:removing stopped containers
Browse files Browse the repository at this point in the history
  • Loading branch information
mcuadros committed Mar 15, 2015
1 parent 714582c commit 3549488
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions core/docker.go
Expand Up @@ -84,13 +84,11 @@ func (d *Docker) cleanContainers(p *Project) error {

Debug("Cleaning containers", "project", p, "count", len(l), "end-point", d.endPoint)
for _, c := range l {
if !c.IsRunning() {
continue
}

Debug("Stoping container and image", "project", p, "container", c.GetShortId(), "end-point", d.endPoint)
if err := d.killContainer(c); err != nil {
return err
if c.IsRunning() {
Debug("Stoping container and image", "project", p, "container", c.GetShortId(), "end-point", d.endPoint)
if err := d.killContainer(c); err != nil {
return err
}
}

Debug("Removing container", "project", p, "container", c.GetShortId(), "end-point", d.endPoint)
Expand Down

0 comments on commit 3549488

Please sign in to comment.