From f5d8243f15e8094d93a70c887218898598306934 Mon Sep 17 00:00:00 2001 From: Nils Jakobi Date: Sat, 5 May 2018 10:28:19 +0200 Subject: [PATCH] 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. --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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