mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-21 21:30:48 +02:00
Set minimum required API Version of docker to 1.24, this basically means we require at least docker 1.12.x or newer, therefore we also support docker 1.13.x.
This commit is contained in:
parent
0989245a1c
commit
b7efbc3059
2 changed files with 5 additions and 7 deletions
11
main.go
11
main.go
|
@ -16,6 +16,10 @@ import (
|
|||
"github.com/v2tec/watchtower/container"
|
||||
)
|
||||
|
||||
// DockerAPIMinVersion is the version of the docker API, which is minimally required by
|
||||
// watchtower. Currently we require at least API 1.24 and therefore Docker 1.12 or later.
|
||||
const DockerAPIMinVersion string = "1.24"
|
||||
|
||||
var (
|
||||
client container.Client
|
||||
scheduleSpec string
|
||||
|
@ -75,11 +79,6 @@ func main() {
|
|||
Name: "debug",
|
||||
Usage: "enable debug mode with verbose logging",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "apiversion",
|
||||
Usage: "the version of the docker api",
|
||||
EnvVar: "DOCKER_API_VERSION",
|
||||
},
|
||||
}
|
||||
|
||||
if err := app.Run(os.Args); err != nil {
|
||||
|
@ -190,7 +189,7 @@ func envConfig(c *cli.Context) error {
|
|||
|
||||
err = setEnvOptStr("DOCKER_HOST", c.GlobalString("host"))
|
||||
err = setEnvOptBool("DOCKER_TLS_VERIFY", c.GlobalBool("tlsverify"))
|
||||
err = setEnvOptStr("DOCKER_API_VERSION", c.GlobalString("apiversion"))
|
||||
err = setEnvOptStr("DOCKER_API_VERSION", DockerAPIMinVersion)
|
||||
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue