From e757503234b4e9309fa792ee4f465aacdf720dfa Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Mon, 22 Oct 2018 14:05:53 -0400 Subject: pin docker client version --- image/image.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/image/image.go b/image/image.go index c570ace..43f8000 100644 --- a/image/image.go +++ b/image/image.go @@ -20,6 +20,7 @@ import ( ) // TODO: this file should be rethought... but since it's only for preprocessing it'll be tech debt for now. +const dockerVersion = "1.26" func check(e error) { if e != nil { @@ -199,7 +200,7 @@ func InitializeData(imageID string) ([]*Layer, []*filetree.FileTree) { // pull the image if it does not exist ctx := context.Background() - dockerClient, err := client.NewClientWithOpts() + dockerClient, err := client.NewClientWithOpts(client.WithVersion(dockerVersion)) if err != nil { fmt.Println("Could not connect to the Docker daemon:" + err.Error()) os.Exit(1) @@ -329,7 +330,7 @@ func InitializeData(imageID string) ([]*Layer, []*filetree.FileTree) { func saveImage(imageID string) (string, string) { ctx := context.Background() - dockerClient, err := client.NewClientWithOpts() + dockerClient, err := client.NewClientWithOpts(client.WithVersion(dockerVersion)) if err != nil { fmt.Println("Could not connect to the Docker daemon:" + err.Error()) os.Exit(1) -- cgit v1.2.3