aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorNils Jakobi <jakobi.nils@gmail.com>2018-05-05 10:28:19 +0200
committerJakob Borg <jakob@kastelo.net>2018-05-05 10:28:19 +0200
commitf5d8243f15e8094d93a70c887218898598306934 (patch)
tree184ca0f5e4da31b8c2738b31ad567c3fafcc1101 /Dockerfile
parentc9c2e69f49261e590dd43c2dd4387d23f13bdff3 (diff)
downloadsyncthing-f5d8243f15e8094d93a70c887218898598306934.tar.gz
syncthing-f5d8243f15e8094d93a70c887218898598306934.zip
dockerfile: Incorporate exposed ports, add volume (#4908)
Added EXPOSE to Dockerfile. this way these ports will show up in docker GUIs like cockpit. Added VOLUME parameter, this renders creating the folder (/var/syncthing) obsolete.
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
index 6574f053d..0a0ea5ab4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -10,13 +10,16 @@ RUN rm -f syncthing && go run build.go build syncthing
FROM alpine
+EXPOSE 8384 22000 21027/udp
+
+VOLUME ["/var/syncthing"]
+
RUN apk add --no-cache ca-certificates
COPY --from=builder /go/src/github.com/syncthing/syncthing/syncthing /bin/syncthing
RUN echo 'syncthing:x:1000:1000::/var/syncthing:/sbin/nologin' >> /etc/passwd \
&& echo 'syncthing:!::0:::::' >> /etc/shadow \
- && mkdir /var/syncthing \
&& chown syncthing /var/syncthing
USER syncthing