mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
Merge docker update PR
This commit is contained in:
commit
5da7d6d1ae
3 changed files with 22 additions and 18 deletions
|
@ -1,26 +1,30 @@
|
||||||
FROM alpine:latest as builder
|
FROM debian:stretch as builder
|
||||||
|
|
||||||
|
## Supports x86_64, x86, arm, and arm64
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y curl gnupg
|
||||||
|
RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 0x1657198823e52a61 && \
|
||||||
|
echo "deb http://download.zerotier.com/debian/stretch stretch main" > /etc/apt/sources.list.d/zerotier.list
|
||||||
|
RUN apt-get update && apt-get install -y zerotier-one=1.2.12
|
||||||
|
|
||||||
|
FROM alpine:latest
|
||||||
MAINTAINER Adam Ierymenko <adam.ierymenko@zerotier.com>
|
MAINTAINER Adam Ierymenko <adam.ierymenko@zerotier.com>
|
||||||
|
|
||||||
ARG VERSION=1.2.12
|
LABEL version="1.2.12"
|
||||||
LABEL version=$VERSION
|
LABEL description="Containerized ZeroTier One for use on CoreOS or other Docker-only Linux hosts."
|
||||||
LABEL description="Containerized ZeroTier One"
|
|
||||||
|
|
||||||
RUN apk add --update alpine-sdk linux-headers
|
# Uncomment to build in container
|
||||||
RUN git clone https://github.com/zerotier/ZeroTierOne.git
|
#RUN apk add --update alpine-sdk linux-headers
|
||||||
WORKDIR ZeroTierOne
|
|
||||||
RUN git checkout $VERSION
|
|
||||||
RUN make
|
|
||||||
|
|
||||||
FROM alpine:latest as final
|
|
||||||
|
|
||||||
RUN apk add --update libgcc libstdc++
|
RUN apk add --update libgcc libstdc++
|
||||||
|
|
||||||
COPY --from=builder /ZeroTierOne/zerotier-one /
|
|
||||||
RUN chmod 0755 /zerotier-one
|
|
||||||
RUN ln -sf /zerotier-one /zerotier-cli
|
|
||||||
RUN mkdir -p /var/lib/zerotier-one
|
RUN mkdir -p /var/lib/zerotier-one
|
||||||
|
|
||||||
|
COPY --from=builder /var/lib/zerotier-one/zerotier-cli /usr/sbin/zerotier-cli
|
||||||
|
COPY --from=builder /var/lib/zerotier-one/zerotier-idtool /usr/sbin/zerotier-idtool
|
||||||
|
COPY --from=builder /usr/sbin/zerotier-one /usr/sbin/zerotier-one
|
||||||
|
|
||||||
ADD main.sh /
|
ADD main.sh /
|
||||||
RUN chmod 0755 /main.sh
|
RUN chmod 0755 /main.sh
|
||||||
|
ENTRYPOINT ["/main.sh"]
|
||||||
ENTRYPOINT /main.sh
|
CMD ["zerotier-one"]
|
|
@ -7,4 +7,4 @@ if [ ! -e /dev/net/tun ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec /zerotier-one
|
exec "$@"
|
||||||
|
|
|
@ -31,7 +31,7 @@ Settings available in `local.conf` (this is not valid JSON, and JSON does not al
|
||||||
"softwareUpdateChannel": "release"|"beta", /* Software update channel */
|
"softwareUpdateChannel": "release"|"beta", /* Software update channel */
|
||||||
"softwareUpdateDist": true|false, /* If true, distribute software updates (only really useful to ZeroTier, Inc. itself, default is false) */
|
"softwareUpdateDist": true|false, /* If true, distribute software updates (only really useful to ZeroTier, Inc. itself, default is false) */
|
||||||
"interfacePrefixBlacklist": [ "XXX",... ], /* Array of interface name prefixes (e.g. eth for eth#) to blacklist for ZT traffic */
|
"interfacePrefixBlacklist": [ "XXX",... ], /* Array of interface name prefixes (e.g. eth for eth#) to blacklist for ZT traffic */
|
||||||
"allowManagementFrom": "NETWORK/bits"|null, /* If non-NULL, allow JSON/HTTP management from this IP network. Default is 127.0.0.1 only. */
|
"allowManagementFrom": [ "NETWORK/bits", ...] |null, /* If non-NULL, allow JSON/HTTP management from this IP network. Default is 127.0.0.1 only. */
|
||||||
"bind": [ "ip",... ], /* If present and non-null, bind to these IPs instead of to each interface (wildcard IP allowed) */
|
"bind": [ "ip",... ], /* If present and non-null, bind to these IPs instead of to each interface (wildcard IP allowed) */
|
||||||
"allowTcpFallbackRelay": true|false /* Allow or disallow establishment of TCP relay connections (true by default) */
|
"allowTcpFallbackRelay": true|false /* Allow or disallow establishment of TCP relay connections (true by default) */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue