mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-21 21:30:48 +02:00
Add --no-pull support
This commit is contained in:
parent
a8dec129f5
commit
3d0c853e42
3 changed files with 36 additions and 17 deletions
7
main.go
7
main.go
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue