Fixed multi-platform builds (#178)

This commit is contained in:
David Zhao
2021-11-10 15:07:49 -08:00
committed by GitHub
parent 3ff3e91165
commit 0a769662aa
3 changed files with 11 additions and 16 deletions
+5 -1
View File
@@ -1,5 +1,9 @@
FROM golang:1.16-alpine as builder
ARG TARGETPLATFORM
ARG TARGETARCH
RUN echo building for "$TARGETPLATFORM"
WORKDIR /workspace
# Copy the Go Modules manifests
@@ -16,7 +20,7 @@ COPY test/ test/
COPY tools/ tools/
COPY version/ version/
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o livekit-server ./cmd/server
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH GO111MODULE=on go build -a -o livekit-server ./cmd/server
FROM alpine