This repository was archived by the owner on Mar 10, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 1
- FROM openfaas/faas-cli:0.12.8 as faas-cli
2
- FROM openfaas/classic-watchdog:0.18.17 as watchdog
3
- FROM golang:1.13-alpine3.12 as build
1
+ FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/faas-cli:0.12.19 as faas-cli
2
+ FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.1.4 as watchdog
3
+ FROM --platform=${TARGETPLATFORM:-linux/amd64} golang:1.13-alpine3.12 as build
4
+
5
+ ARG TARGETPLATFORM
6
+ ARG BUILDPLATFORM
7
+ ARG TARGETOS
8
+ ARG TARGETARCH
4
9
5
10
ENV CGO_ENABLED=0
6
11
ENV GO111MODULE=off
@@ -15,11 +20,11 @@ COPY . .
15
20
RUN test -z "$(gofmt -l $(find . -type f -name '*.go' -not -path " ./vendor/*"))" \
16
21
|| { echo "Run \" gofmt -s -w\" on your Golang code" ; exit 1; }
17
22
18
- RUN CGO_ENABLED=0 GOOS=linux \
19
- go build --ldflags "-s -w" -a -installsuffix cgo -o handler . && \
20
- go test $(go list ./... | grep -v /vendor/) -cover
23
+ RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
24
+ go build --ldflags "-s -w" -a -installsuffix cgo -o handler .
25
+ RUN go test $(go list ./... | grep -v /vendor/) -cover
21
26
22
- FROM alpine:3.11 as ship
27
+ FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.12 as ship
23
28
24
29
RUN apk --no-cache add \
25
30
ca-certificates \
You can’t perform that action at this time.
0 commit comments