mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-13 21:56:38 +01:00
Add docker api version parameter (#372)
* Add docker api version parameter * Note for minimum supported version * Tests for EnvConfig
This commit is contained in:
parent
7f7db72686
commit
f820eb5b3a
4 changed files with 63 additions and 8 deletions
|
|
@ -18,10 +18,6 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// DockerAPIMinVersion is the minimum version of the docker api required to
|
||||
// use watchtower
|
||||
const DockerAPIMinVersion string = "1.24"
|
||||
|
||||
var (
|
||||
client container.Client
|
||||
scheduleSpec string
|
||||
|
|
@ -90,7 +86,7 @@ func PreRun(cmd *cobra.Command, args []string) {
|
|||
lifecycleHooks, _ = f.GetBool("enable-lifecycle-hooks")
|
||||
|
||||
// configure environment vars for client
|
||||
err := flags.EnvConfig(cmd, DockerAPIMinVersion)
|
||||
err := flags.EnvConfig(cmd)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue