Syncthing cleanup
This commit is contained in:
@ -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"]
|
||||
|
Reference in New Issue
Block a user