mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-08 22:31:04 +00:00
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.
This commit is contained in:
parent
c9c2e69f49
commit
f5d8243f15
@ -10,13 +10,16 @@ RUN rm -f syncthing && go run build.go build syncthing
|
|||||||
|
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
|
||||||
|
EXPOSE 8384 22000 21027/udp
|
||||||
|
|
||||||
|
VOLUME ["/var/syncthing"]
|
||||||
|
|
||||||
RUN apk add --no-cache ca-certificates
|
RUN apk add --no-cache ca-certificates
|
||||||
|
|
||||||
COPY --from=builder /go/src/github.com/syncthing/syncthing/syncthing /bin/syncthing
|
COPY --from=builder /go/src/github.com/syncthing/syncthing/syncthing /bin/syncthing
|
||||||
|
|
||||||
RUN echo 'syncthing:x:1000:1000::/var/syncthing:/sbin/nologin' >> /etc/passwd \
|
RUN echo 'syncthing:x:1000:1000::/var/syncthing:/sbin/nologin' >> /etc/passwd \
|
||||||
&& echo 'syncthing:!::0:::::' >> /etc/shadow \
|
&& echo 'syncthing:!::0:::::' >> /etc/shadow \
|
||||||
&& mkdir /var/syncthing \
|
|
||||||
&& chown syncthing /var/syncthing
|
&& chown syncthing /var/syncthing
|
||||||
|
|
||||||
USER syncthing
|
USER syncthing
|
||||||
|
Loading…
Reference in New Issue
Block a user