From 4be7c4c63093c054576d1d5584730a33f1ebf0c9 Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Tue, 27 Jun 2023 10:38:00 +0100 Subject: [PATCH] Migrate to Go 1.20 for both templates Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- template/golang-http/Dockerfile | 4 ++-- template/golang-http/go.mod | 2 +- template/golang-middleware/Dockerfile | 4 ++-- template/golang-middleware/go.mod | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/template/golang-http/Dockerfile b/template/golang-http/Dockerfile index 8e3316c..59b9d7d 100644 --- a/template/golang-http/Dockerfile +++ b/template/golang-http/Dockerfile @@ -1,5 +1,5 @@ FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.9.11 as watchdog -FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine as build +FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.20-alpine as build ARG TARGETPLATFORM ARG BUILDPLATFORM @@ -37,7 +37,7 @@ WORKDIR /go/src/handler RUN CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOFLAGS=${GOFLAGS} \ go build --ldflags "-s -w" -o handler . -FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.17.2 as ship +FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.18.2 as ship # Add non root user and certs RUN apk --no-cache add ca-certificates \ diff --git a/template/golang-http/go.mod b/template/golang-http/go.mod index c477c58..94375f6 100644 --- a/template/golang-http/go.mod +++ b/template/golang-http/go.mod @@ -1,5 +1,5 @@ module handler -go 1.18 +go 1.19 require github.com/openfaas/templates-sdk/go-http v0.0.0-20220408082716-5981c545cb03 diff --git a/template/golang-middleware/Dockerfile b/template/golang-middleware/Dockerfile index 4975bae..4ba9c7f 100644 --- a/template/golang-middleware/Dockerfile +++ b/template/golang-middleware/Dockerfile @@ -1,5 +1,5 @@ FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.9.11 as watchdog -FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine as build +FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.20-alpine as build ARG TARGETPLATFORM ARG BUILDPLATFORM @@ -34,7 +34,7 @@ WORKDIR /go/src/handler RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} \ go build --ldflags "-s -w" -o handler . -FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.17.2 as ship +FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.18.2 as ship # Add non root user and certs RUN apk --no-cache add ca-certificates \ diff --git a/template/golang-middleware/go.mod b/template/golang-middleware/go.mod index 3449625..6b1effa 100644 --- a/template/golang-middleware/go.mod +++ b/template/golang-middleware/go.mod @@ -1,3 +1,3 @@ module handler -go 1.18 +go 1.19