Dockerfile: use GO_VERSION build-arg for overriding Go version

This allows overriding the version of Go without making modifications in the
source code, which can be useful to test against multiple versions.

For example:

    make GO_VERSION=1.13beta1 -f docker.Makefile binary

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0d3022c6d2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2019-08-14 03:03:04 +02:00
parent 0ea69840c6
commit 0ecfcb5997
5 changed files with 18 additions and 10 deletions
+3 -1
View File
@@ -1,4 +1,6 @@
FROM dockercore/golang-cross:1.12.7
ARG GO_VERSION=1.12.7
FROM dockercore/golang-cross:${GO_VERSION}
ENV DISABLE_WARN_OUTSIDE_CONTAINER=1
WORKDIR /go/src/github.com/docker/cli
COPY . .