2022-10-01 17:31:31 -07:00
|
|
|
FROM archlinux
|
|
|
|
LABEL maintiner="Mark <mark@betalupi.com>"
|
|
|
|
|
|
|
|
# Create users and groups.
|
|
|
|
# Make sure uids and gids are the same on the host!
|
|
|
|
#
|
|
|
|
# Syncthing should be installed AFTER users are created.
|
|
|
|
# The package will create its own syncthing user if one does not exist.
|
|
|
|
# We need to do it manually, to control uid and gid.
|
|
|
|
|
2023-08-25 20:40:18 -07:00
|
|
|
ARG ST_GID="1000"
|
|
|
|
ARG ST_UID="1000"
|
|
|
|
|
|
|
|
RUN groupadd -g ${ST_GID} syncthing && \
|
|
|
|
useradd -g ${ST_GID} -u ${ST_UID} syncthing -d /stdata && \
|
2022-10-01 17:31:31 -07:00
|
|
|
pacman -Fyy --noconfirm && \
|
|
|
|
pacman -Syu --noconfirm && \
|
|
|
|
pacman -S --noconfirm syncthing syncthing-relaysrv
|
|
|
|
|
2023-08-25 20:40:18 -07:00
|
|
|
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
|
|
|
|
|
2022-10-01 17:31:31 -07:00
|
|
|
|
|
|
|
# Syncthing
|
|
|
|
EXPOSE 8384
|
|
|
|
# Relay
|
|
|
|
EXPOSE 22067
|
|
|
|
|
2023-08-25 20:40:18 -07:00
|
|
|
|
|
|
|
USER ${ST_UID}
|
|
|
|
WORKDIR "/stdata"
|
|
|
|
|
2022-10-01 17:31:31 -07:00
|
|
|
ENTRYPOINT ["/bin/bash", "start.sh"]
|