mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-29 18:33:05 +00:00
Change build os
This commit is contained in:
parent
7e9abbeaec
commit
091b05f155
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
# Builder image
|
||||
FROM docker.io/golang:1.18.0-bullseye AS build
|
||||
FROM --platform=$BUILDPLATFORM docker.io/golang:1.18.0-bullseye AS build
|
||||
ARG VERSION=dev
|
||||
ENV GOPATH /go
|
||||
WORKDIR /go/src/headscale
|
||||
|
@ -8,8 +8,8 @@ COPY go.mod go.sum /go/src/headscale/
|
|||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN CGO_ENABLED=0 GOOS=linux go install -ldflags="-s -w -X github.com/juanfont/headscale/cmd/headscale/cli.Version=$VERSION" -a ./cmd/headscale
|
||||
ARG TARGETOS TARGETARCH
|
||||
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go install -ldflags="-s -w -X github.com/juanfont/headscale/cmd/headscale/cli.Version=$VERSION" -a ./cmd/headscale
|
||||
RUN strip /go/bin/headscale
|
||||
RUN test -e /go/bin/headscale
|
||||
|
||||
|
|
Loading…
Reference in a new issue