-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (22 loc) · 732 Bytes
/
Dockerfile
File metadata and controls
28 lines (22 loc) · 732 Bytes
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
ARG TSVERSION=1.96.4
ARG TSFILE=tailscale_${TSVERSION}_amd64.tgz
FROM alpine:latest as tailscale
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 ca-certificates iptables ip6tables \
&& rm -rf /var/cache/apk/*
# creating directories for tailscale
RUN mkdir -p /var/run/tailscale
RUN mkdir -p /var/cache/tailscale
RUN mkdir -p /var/lib/tailscale
# Copy binary to production image
COPY --from=tailscale /app/tailscaled /app/tailscaled
COPY --from=tailscale /app/tailscale /app/tailscale
COPY --from=tailscale /app/start.sh /app/start.sh
# Run on container startup.
USER root
CMD ["/app/start.sh"]