2020-04-08 13:05:07 +02:00
|
|
|
# syncthing
|
|
|
|
|
2021-02-26 17:44:01 +01:00
|
|
|
FROM alpine:3.13
|
2020-04-08 13:05:07 +02:00
|
|
|
|
|
|
|
ARG ARCH
|
2021-08-08 09:27:12 +02:00
|
|
|
ENV VER v1.18.1
|
2020-04-08 13:05:07 +02:00
|
|
|
ENV REL syncthing-linux-${ARCH}-${VER}
|
|
|
|
ENV URI https://github.com/syncthing/syncthing/releases/download/${VER}/${REL}.tar.gz
|
|
|
|
|
|
|
|
RUN apk add --no-cache su-exec
|
|
|
|
|
|
|
|
RUN adduser -u 1001 -h /var/lib/syncthing -D syncthing && \
|
|
|
|
addgroup -S -g 1005 books && addgroup syncthing books && \
|
|
|
|
addgroup -S -g 1006 buku && addgroup syncthing buku
|
|
|
|
|
2021-05-11 11:09:08 +02:00
|
|
|
RUN mkdir -p /data && chown -R syncthing:syncthing /data
|
2020-04-08 13:05:07 +02:00
|
|
|
|
2021-05-11 11:09:08 +02:00
|
|
|
VOLUME /data /var/lib/syncthing
|
2020-04-08 13:05:07 +02:00
|
|
|
|
|
|
|
RUN cd /tmp && \
|
|
|
|
wget ${URI} && \
|
|
|
|
tar -xzf ${REL}.tar.gz && \
|
|
|
|
cp /tmp/${REL}/syncthing /usr/local/bin/syncthing && \
|
|
|
|
rm -r /tmp/${REL} /tmp/${REL}.tar.gz
|
|
|
|
|
|
|
|
COPY docker-entrypoint.sh /entrypoint
|
|
|
|
|
|
|
|
RUN chmod +x /entrypoint
|
|
|
|
ENTRYPOINT ["/entrypoint"]
|
|
|
|
CMD ["/usr/local/bin/syncthing", "-home=/var/lib/syncthing"]
|