From b8e04d790ef5888a722bc3eecbe4682429509481 Mon Sep 17 00:00:00 2001 From: fnaranjo Date: Mon, 19 Feb 2024 17:32:49 +0100 Subject: [PATCH] fix: pin golang alpine instead of latest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [#187010312](https://www.pivotaltracker.com/story/show/187010312) `golang:latest` is based on debian instead of alpine. Since we were using golang:1.22.0-alpine before we should keep using latest version of alpine `golang:alpine`. This Dockerfile definitely needs Alpine since we perform some APK operations: https://github.com/cloudfoundry/cloud-service-broker/pull/957 Also, we must keep in mind that there might be differences in the golang binaries, since Alpine binaries tend to be statically linked against MUSL instead of glibc: https://github.com/golang/go/issues/62053 We might want to keep an eye on this topic to ensure our binaries are always built in a consistent way. Thank you very much @zucchinidev 🥇 for noticing this error and letting me know :) Keep up the good work! Co-authored-by: Andrea Zucchini --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a04af951a..bc27207ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:latest AS build +FROM golang:alpine AS build RUN apk update RUN apk upgrade RUN apk add --update gcc g++