forked from ido1990/tailscale-relay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (20 loc) · 823 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
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://login.tailscale.com
RUN apk add --no-cache iptables
COPY --from=builder /build/tailscale /usr/bin/
COPY --from=builder /build/tailscaled /usr/bin/
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]