Skip to content

Commit

Permalink
dockerfile: Incorporate exposed ports, add volume (syncthing#4908)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
thunderstorm99 authored and calmh committed May 5, 2018
1 parent c9c2e69 commit f5d8243
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f5d8243

Please sign in to comment.