File tree Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 1- FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.9.10 as watchdog
2- FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.18-alpine3.16 as build
1+ FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.9.11 as watchdog
2+ FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine as build
33
44ARG TARGETPLATFORM
55ARG BUILDPLATFORM
@@ -22,7 +22,6 @@ ARG GOFLAGS=""
2222ARG CGO_ENABLED=0
2323ENV CGO_ENABLED=${CGO_ENABLED}
2424
25-
2625# Run a gofmt and exclude all vendored code.
2726RUN test -z "$(gofmt -l $(find . -type f -name '*.go' -not -path " ./vendor/*" -not -path " ./function/vendor/*"))" || { echo "Run \" gofmt -s -w\" on your Golang code" ; exit 1; }
2827
@@ -38,10 +37,12 @@ WORKDIR /go/src/handler
3837RUN CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOFLAGS=${GOFLAGS} \
3938 go build --ldflags "-s -w" -a -installsuffix cgo -o handler .
4039
41- FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.16.2 as ship
40+ FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.17.1 as ship
4241# Add non root user and certs
42+
4343RUN apk --no-cache add ca-certificates \
4444 && addgroup -S app && adduser -S -g app app
45+
4546# Split instructions so that buildkit can run & cache
4647# the previous command ahead of time.
4748RUN mkdir -p /home/app \
Original file line number Diff line number Diff line change 11language : golang-http
22fprocess : ./handler
33welcome_message : |
4- You have created a new function which uses Go 1.18 and Alpine
4+ You have created a new function which uses Go 1.19 and Alpine
55 Linux as its base image.
66
77 To disable the go module, for private vendor code, please use
Original file line number Diff line number Diff line change 1- FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.9.10 as watchdog
2- FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.18-alpine3.16 as build
1+ FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.9.11 as watchdog
2+ FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine as build
33
44ARG TARGETPLATFORM
55ARG BUILDPLATFORM
@@ -34,11 +34,12 @@ WORKDIR /go/src/handler
3434RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
3535 go build --ldflags "-s -w" -a -installsuffix cgo -o handler .
3636
37- FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.16.2 as ship
37+ FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.17.1 as ship
3838
3939# Add non root user and certs
4040RUN apk --no-cache add ca-certificates \
4141 && addgroup -S app && adduser -S -g app app
42+
4243# Split instructions so that buildkit can run & cache
4344# the previous command ahead of time.
4445RUN mkdir -p /home/app \
Original file line number Diff line number Diff line change 11language : golang-middleware
22fprocess : ./handler
33welcome_message : |
4- You have created a new function which uses Go 1.18 and Alpine
4+ You have created a new function which uses Go 1.19 and Alpine
55 Linux as its base image.
66
77 To disable the go module, for private vendor code, please use
You can’t perform that action at this time.
0 commit comments