Fix: TARGET_GOOS and TARGET_GOARCH were ignored in dockerfile

This commit is contained in:
Nicolas Dorier 2022-06-30 13:30:08 +09:00 committed by GitHub
parent d2cb803336
commit 60de13a3d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -2,10 +2,12 @@
ARG TARGET_GOOS ARG TARGET_GOOS
ARG TARGET_GOARCH ARG TARGET_GOARCH
FROM golang:1.17.1 as builder FROM golang:1.17.1 as builder
ARG TARGET_GOOS
ARG TARGET_GOARCH
ENV GO111MODULE=on \ ENV GO111MODULE=on \
CGO_ENABLED=0 \ CGO_ENABLED=0 \
TARGET_GOOS=${TARGET_GOOS} \ TARGET_OS=${TARGET_GOOS} \
TARGET_GOARCH=${TARGET_GOARCH} TARGET_ARCH=${TARGET_GOARCH}
LABEL org.opencontainers.image.source="https://github.com/cloudflare/cloudflared" LABEL org.opencontainers.image.source="https://github.com/cloudflare/cloudflared"