Add docker api version parameter (#372)

* Add docker api version parameter

* Note for minimum supported version

* Tests for EnvConfig
This commit is contained in:
Kaloyan Raev 2019-08-25 13:37:20 +03:00 committed by Simon Aronsson
parent 7f7db72686
commit f820eb5b3a
4 changed files with 63 additions and 8 deletions

View file

@ -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)
}