File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 paths :
1212 - ' runner/**'
1313 - ' btc/**'
14+ - ' rsync/**'
1415 schedule :
1516 - cron : ' 0 6 * * 1' # Every Monday at 06:00 UTC
1617
Original file line number Diff line number Diff line change 1+ FROM ubuntu:24.04
2+ RUN apt-get update && \
3+ DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends rsync && \
4+ apt-get clean autoclean && \
5+ apt-get autoremove -y && \
6+ rm -rf /var/lib/apt/lists/*
7+
8+ EXPOSE 873
9+ ADD ./entrypoint.sh /entrypoint.sh
10+ RUN chmod +x /entrypoint.sh
11+
12+ ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ VOLUME=${VOLUME:-/ volume}
3+ ALLOW=${ALLOW:- 192.168.0.0/ 16 172.16.0.0/ 12}
4+ USER=${USER:- nobody}
5+ GROUP=${GROUP:- nogroup}
6+
7+ mkdir -p ${VOLUME}
8+
9+ getent group ${GROUP} > /dev/null || addgroup ${GROUP}
10+ getent passwd ${USER} > /dev/null || adduser -D -H -G ${GROUP} ${USER}
11+ chown -R ${USER} :${GROUP} ${VOLUME}
12+
13+ cat << EOF > /etc/rsyncd.conf
14+ uid = ${USER}
15+ gid = ${GROUP}
16+ use chroot = yes
17+ log file = /dev/stdout
18+ reverse lookup = no
19+ [volume]
20+ hosts deny = *
21+ hosts allow = ${ALLOW}
22+ read only = false
23+ path = ${VOLUME}
24+ comment = docker volume
25+ EOF
26+
27+ exec /usr/bin/rsync --no-detach --daemon --config /etc/rsyncd.conf
You can’t perform that action at this time.
0 commit comments