containers-syncthing/Dockerfile

35 lines
1.1 KiB
Text
Raw Normal View History

2019-09-11 01:32:07 +00:00
FROM sutty/daemonize:latest AS build
2019-09-10 23:10:18 +00:00
MAINTAINER "f <f@sutty.nl>"
2019-09-11 01:32:07 +00:00
ARG VERSION=1.2.2
RUN wget https://github.com/syncthing/syncthing/releases/download/v${VERSION}/syncthing-linux-amd64-v${VERSION}.tar.gz
RUN tar x -Of syncthing-linux-amd64-v${VERSION}.tar.gz syncthing-linux-amd64-v${VERSION}/syncthing \
> /usr/local/bin/syncthing
RUN chmod +x /usr/local/bin/syncthing
RUN strip --strip-all /usr/local/bin/syncthing
COPY ./syncthing_start.sh /usr/local/bin/syncthing_start
2019-09-30 19:26:54 +00:00
RUN chmod 755 /usr/local/bin/syncthing_start
2019-09-11 01:32:07 +00:00
RUN echo /home/builder/packages/home > /etc/apk/repositories
RUN apk add --no-cache daemonize
FROM sutty/monit:latest
COPY --from=build /usr/local/bin/syncthing /usr/local/bin/syncthing
COPY --from=build /usr/local/bin/syncthing_start /usr/local/bin/syncthing_start
COPY --from=build /usr/sbin/daemonize /usr/sbin/daemonize
COPY ./monit.conf /etc/monit.d/syncthing.conf
RUN addgroup -S syncthing
RUN adduser -s /bin/sh -G syncthing -S -h /home/syncthing syncthing
RUN monit -t
RUN apk add --no-cache ca-certificates
EXPOSE 22000
EXPOSE 22000/udp
VOLUME /home/syncthing