Add --no-pull support

This commit is contained in:
Brian DeHamer 2015-07-21 23:29:00 +00:00
parent a8dec129f5
commit 3d0c853e42
3 changed files with 36 additions and 17 deletions

View file

@ -35,6 +35,10 @@ func main() {
Value: 300,
Usage: "poll interval (in seconds)",
},
cli.BoolFlag{
Name: "no-pull",
Usage: "do not pull new images",
},
}
handleSignals()
@ -76,5 +80,6 @@ func start(c *cli.Context) {
func newContainerClient(c *cli.Context) container.Client {
dockerHost := c.GlobalString("host")
return container.NewClient(dockerHost)
noPull := c.GlobalBool("no-pull")
return container.NewClient(dockerHost, !noPull)
}