mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
Add multiarch image make target
Updates #3112 Signed-off-by: Mangirdas <mangirdas@judeikis.lt>
This commit is contained in:
parent
649f7556e8
commit
f771327f0c
@ -48,8 +48,9 @@ ARG VERSION_SHORT=""
|
|||||||
ENV VERSION_SHORT=$VERSION_SHORT
|
ENV VERSION_SHORT=$VERSION_SHORT
|
||||||
ARG VERSION_GIT_HASH=""
|
ARG VERSION_GIT_HASH=""
|
||||||
ENV VERSION_GIT_HASH=$VERSION_GIT_HASH
|
ENV VERSION_GIT_HASH=$VERSION_GIT_HASH
|
||||||
|
ARG TARGETARCH
|
||||||
|
|
||||||
RUN go install -tags=xversion -ldflags="\
|
RUN GOARCH=$TARGETARCH go install -tags=xversion -ldflags="\
|
||||||
-X tailscale.com/version.Long=$VERSION_LONG \
|
-X tailscale.com/version.Long=$VERSION_LONG \
|
||||||
-X tailscale.com/version.Short=$VERSION_SHORT \
|
-X tailscale.com/version.Short=$VERSION_SHORT \
|
||||||
-X tailscale.com/version.GitCommit=$VERSION_GIT_HASH" \
|
-X tailscale.com/version.GitCommit=$VERSION_GIT_HASH" \
|
||||||
|
6
Makefile
6
Makefile
@ -1,3 +1,5 @@
|
|||||||
|
IMAGE_REPO ?= tailscale/tailscale
|
||||||
|
|
||||||
usage:
|
usage:
|
||||||
echo "See Makefile"
|
echo "See Makefile"
|
||||||
|
|
||||||
@ -21,6 +23,10 @@ build386:
|
|||||||
buildlinuxarm:
|
buildlinuxarm:
|
||||||
GOOS=linux GOARCH=arm go install tailscale.com/cmd/tailscale tailscale.com/cmd/tailscaled
|
GOOS=linux GOARCH=arm go install tailscale.com/cmd/tailscale tailscale.com/cmd/tailscaled
|
||||||
|
|
||||||
|
|
||||||
|
buildmultiarchimage:
|
||||||
|
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t ${IMAGE_REPO}:latest --push -f Dockerfile .
|
||||||
|
|
||||||
check: staticcheck vet depaware buildwindows build386 buildlinuxarm
|
check: staticcheck vet depaware buildwindows build386 buildlinuxarm
|
||||||
|
|
||||||
staticcheck:
|
staticcheck:
|
||||||
|
Loading…
Reference in New Issue
Block a user