mirror of
https://github.com/zyclonite/zerotier-docker.git
synced 2025-01-24 05:58:34 +01:00
28 lines
793 B
Docker
28 lines
793 B
Docker
ARG ALPINE_ARCH
|
|
ARG ALPINE_VERSION
|
|
ARG ZT_COMMIT
|
|
ARG ZT_VERSION
|
|
|
|
FROM docker.io/\${ALPINE_ARCH}/alpine:${ALPINE_VERSION} as builder
|
|
|
|
RUN apk add --update alpine-sdk linux-headers \
|
|
&& git clone --quiet https://github.com/zerotier/ZeroTierOne.git /src \
|
|
&& git -C src reset --quiet --hard ${ZT_COMMIT} \
|
|
&& cd /src \
|
|
&& make -f make-linux.mk
|
|
|
|
FROM docker.io/\${ALPINE_ARCH}/alpine:${ALPINE_VERSION}
|
|
LABEL version="${ZT_VERSION}"
|
|
LABEL description="ZeroTier One as Docker Image"
|
|
|
|
RUN apk add --update --no-cache libc6-compat libstdc++
|
|
|
|
EXPOSE 9993/udp
|
|
|
|
COPY --from=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
|
|
|
|
ENTRYPOINT ["zerotier-one"]
|