Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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