Skip to content

Commit

Permalink
support non-amd64
Browse files Browse the repository at this point in the history
Signed-off-by: Xe Iaso <[email protected]>
  • Loading branch information
Xe Iaso committed Apr 13, 2023
1 parent ed9d8cc commit 6bdc88c
Showing 1 changed file with 20 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,32 @@ dir="$(mktemp -d)"
pushd .
cd "${dir}"

tarball="$(curl 'https://pkgs.tailscale.com/stable/?mode=json' | jq -r .Tarballs.amd64)"
GOARCH=""

case `uname -m` in
x86_64)
GOARCH="amd64"
;;

aarch64)
GOARCH="arm64"
;;
riscv64)
GOARCH="riscv64"
;;
*)
echo "Unknown CPU type $(uname -m), please file a bug at https://github.com/tailscale-dev/docker-mod"
esac

tarball="$(curl 'https://pkgs.tailscale.com/stable/?mode=json' | jq -r .Tarballs.${GOARCH})"
version="$(echo ${tarball} | cut -d_ -f2)"

curl "https://pkgs.tailscale.com/stable/${tarball}" -o tailscale.tgz

tar xzf tailscale.tgz

cp -vrf "tailscale_${version}_amd64"/tailscale /usr/bin/tailscale
cp -vrf "tailscale_${version}_amd64"/tailscaled /usr/sbin/tailscaled
cp -vrf "tailscale_${version}_${GOARCH}"/tailscale /usr/bin/tailscale
cp -vrf "tailscale_${version}_${GOARCH}"/tailscaled /usr/sbin/tailscaled

popd
rm -rf "${dir}"

0 comments on commit 6bdc88c

Please sign in to comment.