|
|
|
@ -2,12 +2,12 @@ package container
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"fmt"
|
|
|
|
|
"time"
|
|
|
|
|
"io/ioutil"
|
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
log "github.com/Sirupsen/logrus"
|
|
|
|
|
dockerclient "github.com/docker/docker/client"
|
|
|
|
|
"github.com/docker/docker/api/types"
|
|
|
|
|
dockerclient "github.com/docker/docker/client"
|
|
|
|
|
"golang.org/x/net/context"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
@ -76,7 +76,7 @@ func (client dockerClient) ListContainers(fn Filter) ([]Container, error) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
c := Container{containerInfo: &containerInfo, imageInfo: &imageInfo}
|
|
|
|
|
if (fn(c)) {
|
|
|
|
|
if fn(c) {
|
|
|
|
|
cs = append(cs, c)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -115,7 +115,7 @@ func (client dockerClient) StopContainer(c Container, timeout time.Duration) err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (client dockerClient) StartContainer(c Container) error {
|
|
|
|
|
bg := context.Background();
|
|
|
|
|
bg := context.Background()
|
|
|
|
|
config := c.runtimeConfig()
|
|
|
|
|
hostConfig := c.hostConfig()
|
|
|
|
|
name := c.Name()
|
|
|
|
@ -180,7 +180,6 @@ func (client dockerClient) IsContainerStale(c Container) (bool, error) {
|
|
|
|
|
log.Debugf("No new images found for %s", c.Name())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|