Syncthing cleanup

This commit is contained in:
2023-08-25 20:40:18 -07:00
parent 134183029f
commit 38966e4a63
2 changed files with 20 additions and 25 deletions

View File

@ -8,19 +8,33 @@ LABEL maintiner="Mark <mark@betalupi.com>"
# The package will create its own syncthing user if one does not exist.
# We need to do it manually, to control uid and gid.
RUN groupadd -g 1000 syncthing && \
useradd -g 1000 -u 1000 syncthing -d /stdata && \
ARG ST_GID="1000"
ARG ST_UID="1000"
RUN groupadd -g ${ST_GID} syncthing && \
useradd -g ${ST_GID} -u ${ST_UID} syncthing -d /stdata && \
pacman -Fyy --noconfirm && \
pacman -Syu --noconfirm && \
pacman -S --noconfirm syncthing syncthing-relaysrv
VOLUME /syncthing
RUN mkdir /stdata && \
mkdir /stconfig && \
mkdir /stconfig/config && \
chown -R syncthing:syncthing /stdata && \
chmod -R 774 /stdata && \
chown -R syncthing:syncthing /stconfig && \
chmod -R 774 /stconfig
VOLUME /stdata
VOLUME /stconfig
# Syncthing
EXPOSE 8384
# Relay
EXPOSE 22067
COPY start.sh /start.sh
USER ${ST_UID}
WORKDIR "/stdata"
ENTRYPOINT ["/bin/bash", "start.sh"]