2021-10-20 20:09:57 +10:00
|
|
|
#!/usr/bin/env sh
|
2024-02-05 09:46:59 +10:00
|
|
|
# Copyright (c) 2024 Fluent Networks Pty Ltd & AUTHORS All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style
|
|
|
|
# license that can be found in the LICENSE file.
|
2021-10-20 20:09:57 +10:00
|
|
|
#
|
|
|
|
# Updates tailscale respository and runs `docker build` with flags configured for
|
|
|
|
# docker distribution.
|
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
#
|
|
|
|
# WARNING: Tailscale is not yet officially supported in Docker,
|
|
|
|
# Kubernetes, etc.
|
|
|
|
#
|
|
|
|
# It might work, but we don't regularly test it, and it's not as polished as
|
|
|
|
# our currently supported platforms. This is provided for people who know
|
|
|
|
# how Tailscale works and what they're doing.
|
|
|
|
#
|
|
|
|
# Our tracking bug for officially support container use cases is:
|
|
|
|
# https://github.com/tailscale/tailscale/issues/504
|
|
|
|
#
|
|
|
|
# Also, see the various bugs tagged "containers":
|
|
|
|
# https://github.com/tailscale/tailscale/labels/containers
|
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
#
|
|
|
|
# Set PLATFORM as required for your router model. See:
|
|
|
|
# https://mikrotik.com/products/matrix
|
|
|
|
#
|
2024-12-24 15:04:40 +10:00
|
|
|
PLATFORM="linux/amd64"
|
|
|
|
TAILSCALE_VERSION=1.78.1
|
2025-02-01 15:08:13 +10:00
|
|
|
VERSION=0.1.35
|
2021-10-20 20:09:57 +10:00
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
2022-10-25 18:52:32 +10:00
|
|
|
rm -f tailscale.tar
|
|
|
|
|
2022-09-14 15:52:48 -05:00
|
|
|
if [ ! -d ./tailscale/.git ]
|
2021-10-20 20:09:57 +10:00
|
|
|
then
|
2022-10-25 18:52:32 +10:00
|
|
|
git -c advice.detachedHead=false clone https://github.com/tailscale/tailscale.git --branch v$TAILSCALE_VERSION
|
2021-10-20 20:09:57 +10:00
|
|
|
fi
|
|
|
|
|
2024-12-24 15:04:40 +10:00
|
|
|
TS_USE_TOOLCHAIN="Y"
|
2021-10-20 20:09:57 +10:00
|
|
|
cd tailscale && eval $(./build_dist.sh shellvars) && cd ..
|
|
|
|
|
|
|
|
docker buildx build \
|
2022-10-25 18:52:32 +10:00
|
|
|
--no-cache \
|
2024-01-06 10:39:50 +10:00
|
|
|
--build-arg TAILSCALE_VERSION=$TAILSCALE_VERSION \
|
2021-10-20 20:09:57 +10:00
|
|
|
--build-arg VERSION_LONG=$VERSION_LONG \
|
|
|
|
--build-arg VERSION_SHORT=$VERSION_SHORT \
|
|
|
|
--build-arg VERSION_GIT_HASH=$VERSION_GIT_HASH \
|
|
|
|
--platform $PLATFORM \
|
2022-10-25 18:52:32 +10:00
|
|
|
--load -t ghcr.io/fluent-networks/tailscale-mikrotik:$VERSION .
|
2021-10-20 20:09:57 +10:00
|
|
|
|
2022-10-25 18:52:32 +10:00
|
|
|
docker save -o tailscale.tar ghcr.io/fluent-networks/tailscale-mikrotik:$VERSION
|