mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-16 07:00:13 +01:00
fix: increase default DOCKER_API_VERSION to 1.44
This commit is contained in:
parent
ed78a5bbed
commit
434bd067cf
3 changed files with 2 additions and 13 deletions
11
cmd/root.go
11
cmd/root.go
|
|
@ -122,17 +122,6 @@ func PreRun(cmd *cobra.Command, _ []string) {
|
||||||
log.Warn("Using `WATCHTOWER_NO_PULL` and `WATCHTOWER_MONITOR_ONLY` simultaneously might lead to no action being taken at all. If this is intentional, you may safely ignore this message.")
|
log.Warn("Using `WATCHTOWER_NO_PULL` and `WATCHTOWER_MONITOR_ONLY` simultaneously might lead to no action being taken at all. If this is intentional, you may safely ignore this message.")
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if DOCKER_API_VERSION is set
|
|
||||||
if os.Getenv("DOCKER_API_VERSION") == "" {
|
|
||||||
log.Warn("The DOCKER_API_VERSION environment variable is not set. This may cause unexpected behavior while recreating docker containers. Defaulting to 1.44")
|
|
||||||
// set DOCKER_API_VERSION to 1.44
|
|
||||||
os.Setenv("DOCKER_API_VERSION", "1.44")
|
|
||||||
}
|
|
||||||
// check if DOCKER_API_VERSION is set to minimum 1.44 or higher
|
|
||||||
if os.Getenv("DOCKER_API_VERSION") < "1.44" {
|
|
||||||
log.Warn("The DOCKER_API_VERSION environment variable is set to a version lower than 1.44. This may cause unexpected behavior while recreating docker containers.")
|
|
||||||
}
|
|
||||||
|
|
||||||
client = container.NewClient(container.ClientOptions{
|
client = container.NewClient(container.ClientOptions{
|
||||||
IncludeStopped: includeStopped,
|
IncludeStopped: includeStopped,
|
||||||
ReviveStopped: reviveStopped,
|
ReviveStopped: reviveStopped,
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ The API version to use by the Docker client for connecting to the Docker daemon.
|
||||||
Argument: --api-version, -a
|
Argument: --api-version, -a
|
||||||
Environment Variable: DOCKER_API_VERSION
|
Environment Variable: DOCKER_API_VERSION
|
||||||
Type: String
|
Type: String
|
||||||
Default: "1.24"
|
Default: "1.44"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Include restarting
|
## Include restarting
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import (
|
||||||
|
|
||||||
// DockerAPIMinVersion is the minimum version of the docker api required to
|
// DockerAPIMinVersion is the minimum version of the docker api required to
|
||||||
// use watchtower
|
// use watchtower
|
||||||
const DockerAPIMinVersion string = "1.25"
|
const DockerAPIMinVersion string = "1.44"
|
||||||
|
|
||||||
var defaultInterval = int((time.Hour * 24).Seconds())
|
var defaultInterval = int((time.Hour * 24).Seconds())
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue