summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@zerotier.com>2018-09-14 08:07:36 -0700
committerGitHub <noreply@github.com>2018-09-14 08:07:36 -0700
commitb9fd50e348a8ef1f03b09bdd2ca4cf217270efad (patch)
treebd010033ec866f54bc4d66d5670d662c1c40a9a2 /ext
parentef48d1126609a72eb1510457647ac005efefd614 (diff)
parent701d64936d7425ff93f1e7b017c900e2fe99fa71 (diff)
downloadinfinitytier-b9fd50e348a8ef1f03b09bdd2ca4cf217270efad.tar.gz
infinitytier-b9fd50e348a8ef1f03b09bdd2ca4cf217270efad.zip
Merge pull request #845 from asbjornenge/docker-updates
Using multi-stage build for Dockerfile
Diffstat (limited to 'ext')
-rw-r--r--ext/installfiles/linux/zerotier-containerized/Dockerfile18
1 files changed, 12 insertions, 6 deletions
diff --git a/ext/installfiles/linux/zerotier-containerized/Dockerfile b/ext/installfiles/linux/zerotier-containerized/Dockerfile
index 85faace0..f1fc45ed 100644
--- a/ext/installfiles/linux/zerotier-containerized/Dockerfile
+++ b/ext/installfiles/linux/zerotier-containerized/Dockerfile
@@ -1,15 +1,21 @@
-FROM alpine:latest
+FROM alpine:latest as builder
MAINTAINER Adam Ierymenko <adam.ierymenko@zerotier.com>
-LABEL version="1.2.4"
-LABEL description="Containerized ZeroTier One for use on CoreOS or other Docker-only Linux hosts."
+ARG VERSION=1.2.12
+LABEL version=$VERSION
+LABEL description="Containerized ZeroTier One"
-# Uncomment to build in container
-#RUN apk add --update alpine-sdk linux-headers
+RUN apk add --update alpine-sdk linux-headers
+RUN git clone https://github.com/zerotier/ZeroTierOne.git
+WORKDIR ZeroTierOne
+RUN git checkout $VERSION
+RUN make
+
+FROM alpine:latest as final
RUN apk add --update libgcc libstdc++
-ADD zerotier-one /
+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