mirror of
https://github.com/Snawoot/opera-proxy.git
synced 2025-09-02 18:51:08 +00:00
docker: crosscompile
This commit is contained in:
parent
3d216e572b
commit
fd236277eb
1 changed files with 3 additions and 2 deletions
|
@ -1,10 +1,11 @@
|
||||||
FROM golang AS build
|
FROM --platform=$BUILDPLATFORM golang AS build
|
||||||
|
|
||||||
ARG GIT_DESC=undefined
|
ARG GIT_DESC=undefined
|
||||||
|
|
||||||
WORKDIR /go/src/github.com/Snawoot/opera-proxy
|
WORKDIR /go/src/github.com/Snawoot/opera-proxy
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN CGO_ENABLED=0 go build -a -tags netgo -ldflags '-s -w -extldflags "-static" -X main.version='"$GIT_DESC"
|
ARG TARGETOS TARGETARCH
|
||||||
|
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 go build -a -tags netgo -ldflags '-s -w -extldflags "-static" -X main.version='"$GIT_DESC"
|
||||||
ADD https://curl.haxx.se/ca/cacert.pem /certs.crt
|
ADD https://curl.haxx.se/ca/cacert.pem /certs.crt
|
||||||
RUN chmod 0644 /certs.crt
|
RUN chmod 0644 /certs.crt
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue