From 6ee5067a0296b704adc329a5934b01e1b1935028 Mon Sep 17 00:00:00 2001 From: Austin Date: Sun, 12 Mar 2023 18:43:28 -0400 Subject: [PATCH] Update Dockerfile.build to use golang:1.19-alpine The go.mod file requires go 1.19. However, the Dockerfile.build is pulling the golang alpine image from golang:1.15.5-alpine. This results in an error during the "RUN make" step in Dockerfile.build: > # github.com/darcys22/godbledger/internal/build > internal/build/download.go:39:18: undefined: os.ReadFile > internal/build/local.go:132:13: undefined: os.WriteFile > internal/build/util.go:76:18: undefined: os.ReadFile > note: module requires Go 1.19 > make: *** [Makefile:42: build-native] Error 2 > The command '/bin/sh -c make' returned a non-zero code: 2 > make: *** [Makefile:80: docker-build] Error 2 Updating Dockerfile.build to use golang:1.19-alpine instead. --- utils/Dockerfile.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/Dockerfile.build b/utils/Dockerfile.build index 9ea063a..451fbb3 100644 --- a/utils/Dockerfile.build +++ b/utils/Dockerfile.build @@ -1,4 +1,4 @@ -FROM --platform=linux/amd64 golang:1.15.5-alpine AS builder +FROM --platform=linux/amd64 golang:1.19-alpine AS builder # https://megamorf.gitlab.io/2019/09/08/alpine-go-builds-with-cgo-enabled/ RUN apk update