-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
33 lines (20 loc) · 989 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
ARG ALPINE_VERSION=3.11
ARG CADDDY_VERSION=2.0.0
FROM caddy:${CADDDY_VERSION}-alpine as caddy
FROM alpine:${ALPINE_VERSION} as zt-builder
ARG ZT_VERSION=1.8.4
RUN apk add --no-cache --update clang clang-dev alpine-sdk linux-headers \
&& git clone --depth 1 --branch ${ZT_VERSION} https://github.com/zerotier/ZeroTierOne.git /src \
&& cd /src \
&& make -f make-linux.mk zerotier-one
FROM alpine:${ALPINE_VERSION}
LABEL maintainer="[email protected]"
RUN apk add --update --no-cache libc6-compat libstdc++ nss-tools jq
COPY --from=zt-builder /src/zerotier-one /usr/sbin/
RUN mkdir -p /var/lib/zerotier-one \
&& ln -s /usr/sbin/zerotier-one /usr/sbin/zerotier-idtool \
&& ln -s /usr/sbin/zerotier-one /usr/sbin/zerotier-cli
COPY --from=caddy /usr/bin/caddy /usr/bin/caddy
RUN mkdir /etc/caddy/ && printf "http://\n\nrespond \"ZeroTier sidecar is working! Now you just need a real Caddyfile.\"" > /etc/caddy/Caddyfile
ADD exec.sh /usr/local/bin
CMD ["exec.sh"]