Add multiarch image make target

Updates #3112

Signed-off-by: Mangirdas <mangirdas@judeikis.lt>
pull/3257/head
Mangirdas 3 years ago committed by Brad Fitzpatrick
parent 649f7556e8
commit f771327f0c

@ -48,8 +48,9 @@ ARG VERSION_SHORT=""
ENV VERSION_SHORT=$VERSION_SHORT
ARG 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.Short=$VERSION_SHORT \
-X tailscale.com/version.GitCommit=$VERSION_GIT_HASH" \

@ -1,3 +1,5 @@
IMAGE_REPO ?= tailscale/tailscale
usage:
echo "See Makefile"
@ -21,6 +23,10 @@ build386:
buildlinuxarm:
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
staticcheck:

Loading…
Cancel
Save