mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 00:59:58 +00:00
Adding support for multi-architecture images and binaries (#184)
* Allow Dockerfile --build-args to override GOOS and GOARCH defaults Allow Dockerfile --build-args to override GOOS and GOARCH defaults Support building multi architecture binaries remove default OS and ARCH to avoid tag confusion when compiling image through Makefile Tag image with corrosponding OS and ARCH build variables updating Makefile Signed-off-by: Michael Fornaro <20387402+xUnholy@users.noreply.github.com> * remove duplicate import on windows_service.go Signed-off-by: Michael Fornaro <20387402+xUnholy@users.noreply.github.com>
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -1,8 +1,11 @@
|
||||
# use a builder image for building cloudflare
|
||||
ARG TARGET_GOOS
|
||||
ARG TARGET_GOARCH
|
||||
FROM golang:1.13.3 as builder
|
||||
ENV GO111MODULE=on
|
||||
ENV CGO_ENABLED=0
|
||||
ENV GOOS=linux
|
||||
ENV GO111MODULE=on \
|
||||
CGO_ENABLED=0 \
|
||||
TARGET_GOOS=${TARGET_GOOS} \
|
||||
TARGET_GOARCH=${TARGET_GOARCH}
|
||||
|
||||
WORKDIR /go/src/github.com/cloudflare/cloudflared/
|
||||
|
||||
@@ -12,8 +15,6 @@ COPY . .
|
||||
# compile cloudflared
|
||||
RUN make cloudflared
|
||||
|
||||
# ---
|
||||
|
||||
# use a distroless base image with glibc
|
||||
FROM gcr.io/distroless/base-debian10:nonroot
|
||||
|
||||
|
Reference in New Issue
Block a user