forked from hojulian/tailscale-relay
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
31 lines (22 loc) · 918 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM python:3-alpine AS builder
RUN pip install lastversion
ARG CHANNEL=stable
ARG ARCH=amd64
RUN mkdir /build
WORKDIR /build
RUN apk add --no-cache curl tar
ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" /tmp/bustcache
RUN VER=$(lastversion https://github.com/tailscale/tailscale) \
&& echo $VER && curl -vsLo tailscale.tar.gz "https://pkgs.tailscale.com/${CHANNEL}/tailscale_${VER}_${ARCH}.tgz" && \
tar xvf tailscale.tar.gz && \
mv "tailscale_${VER}_${ARCH}/tailscaled" . && \
mv "tailscale_${VER}_${ARCH}/tailscale" .
FROM alpine:3
ENV LOGINSERVER=https://controlplane.tailscale.com
RUN apk add --no-cache iptables
RUN apk add --no-cache tini
# Tini is now available at /sbin/tini
COPY --from=builder /build/tailscale /usr/bin/
COPY --from=builder /build/tailscaled /usr/bin/
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/sbin/tini", "--", "/bin/sh", "/entrypoint.sh"]