forked from patte/fly-tailscale-exit
-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
42 lines (36 loc) · 1022 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
32
33
34
35
36
37
38
39
40
41
42
ARG TSVERSION=1.72.1
ARG TSFILE=tailscale_${TSVERSION}_amd64.tgz
FROM alpine:latest as build
ARG TSFILE
WORKDIR /app
RUN wget https://pkgs.tailscale.com/stable/${TSFILE} && \
tar xzf ${TSFILE} --strip-components=1
COPY . ./
FROM alpine:latest
RUN apk update \
&& apk add --no-cache \
ca-certificates \
iptables \
ip6tables \
iproute2 \
squid \
dante-server \
python3 \
dnsmasq \
&& rm -rf /var/cache/apk/*
RUN mkdir -p \
/var/run/tailscale \
/var/cache/tailscale \
/var/lib/tailscale \
/etc/squid/
# Copy binary to production image
COPY --from=build /app/start.sh /app/start.sh
COPY --from=build /app/tailscaled /app/tailscaled
COPY --from=build /app/tailscale /app/tailscale
COPY --from=build /app/motd /etc/motd
COPY --from=build /app/sockd.conf /etc/sockd.conf
COPY --from=build /app/squid.conf /etc/squid/squid.conf
COPY --from=build /app/dnsmasq.conf /etc/dnsmasq.conf
# Run on container startup.
USER root
CMD ["/app/start.sh"]