Skip to content

Commit

Permalink
crossplatform fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mosajjal committed Feb 1, 2023
1 parent 591919f commit 8ffafcf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Dockerfile-crossplatform
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ RUN mkdir /${PROJECT} && mkdir ${OUTDIR}
COPY . /${PROJECT}
WORKDIR /${PROJECT}

env GOBUILD="go build -ldflags=-s -tags ${GOTAG} -o ${OUTDIR}/${PROJECT}_${GOTAG}" ./cmd/dnsmonster
env GOBUILD="go build -ldflags=-s -tags ${GOTAG} -o ${OUTDIR}/${PROJECT}_${GOTAG}"

# Linux
RUN echo "Building Linux binaries"
RUN export GOOS=linux && export CGO_ENABLED=1 && \
export GOARCH=amd64 && CC="zig cc -target x86_64-${GOOS}-musl" ${GOBUILD}_${GOOS}_${GOARCH}.bin . && \
export GOARCH=386 && CC="zig cc -target i386-${GOOS}-musl" ${GOBUILD}_${GOOS}_${GOARCH}.bin . && \
export GOARCH=arm && CC="zig cc -target arm-${GOOS}-musleabihf" ${GOBUILD}_${GOOS}_${GOARCH}.bin . && \
export GOARCH=arm64 && CC="zig cc -target aarch64-${GOOS}-musl" ${GOBUILD}_${GOOS}_${GOARCH}.bin . && \
export GOARCH=riscv64 && CC="zig cc -target riscv64-${GOOS}-musl" ${GOBUILD}_${GOOS}_${GOARCH}.bin .
export GOARCH=amd64 && CC="zig cc -target x86_64-${GOOS}-musl" ${GOBUILD}_${GOOS}_${GOARCH}.bin ./cmd/dnsmonster && \
export GOARCH=386 && CC="zig cc -target i386-${GOOS}-musl" ${GOBUILD}_${GOOS}_${GOARCH}.bin ./cmd/dnsmonster && \
export GOARCH=arm && CC="zig cc -target arm-${GOOS}-musleabihf" ${GOBUILD}_${GOOS}_${GOARCH}.bin ./cmd/dnsmonster && \
export GOARCH=arm64 && CC="zig cc -target aarch64-${GOOS}-musl" ${GOBUILD}_${GOOS}_${GOARCH}.bin ./cmd/dnsmonster && \
export GOARCH=riscv64 && CC="zig cc -target riscv64-${GOOS}-musl" ${GOBUILD}_${GOOS}_${GOARCH}.bin ./cmd/dnsmonster
# MIPS and PPC are pending patches from Zig #10979, #11829

# Windows
Expand Down

0 comments on commit 8ffafcf

Please sign in to comment.