Skip to content

Commit

Permalink
Migrate to Go 1.20 for both templates
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Jun 27, 2023
1 parent e3d205e commit b8b4362
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions template/golang-http/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion template/golang-http/go.mod
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions template/golang-middleware/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion template/golang-middleware/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module handler

go 1.18
go 1.19

0 comments on commit b8b4362

Please sign in to comment.