From 1f44cef5a39b0a515897df0bf67f3e95fe7a5639 Mon Sep 17 00:00:00 2001 From: ruflin Date: Thu, 12 Sep 2019 15:34:23 +0200 Subject: [PATCH] Fix Docker image to specific Golang version So far the `:latest` image was used for Golang. To be used in production I prefer to tied it to a very specific version so we know what is run and what we test is identical. A file `.go_version` was introduced which long term should serve as the single point of through for the go version, also for CI. At the moment it is only there for documentation purpose. Note: As part of this change I also looked into using the alpine Golang image but it does not have Git included, which makes working with the Golang mod dependency trickier. --- .go_version | 1 + Dockerfile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .go_version diff --git a/.go_version b/.go_version new file mode 100644 index 000000000..feaae22ba --- /dev/null +++ b/.go_version @@ -0,0 +1 @@ +1.13.0 diff --git a/Dockerfile b/Dockerfile index 0b2d518ad..99b29356e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:latest +FROM golang:${GO_VERSION:-1.13.0} RUN \ apt-get update \