blob: 2098508b87564f3474939007d7ba05ad6c8868ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# image is based on stage3-amd64
FROM gentoo/stage3-amd64:latest
COPY rsyncd.conf /opt/rsync/rsyncd.conf
COPY wrap_rsync.sh /opt/rsync/wrap_rsync.sh
# Normally I would advocate for ARG here and pass arguments to wrap_rsync.
# This would enable new docker builds with arguments like:
# docker build . --build_arg WAIT_TIME=30m -t gentoo/rsync
# However, ARG's cannot be passed to ENTRYPOINTs, so we set these as ENV instead.
# Mirror to get data from.
ENV SOURCE_MIRROR=rsync://boobie.gentoo.org/gentoo-portage
# ENV SOURCE_MIRROR=rsync://rsync.us.gentoo.org/gentoo-portage
# Where to write the data in this container.
ENV DEST_DIR=/dev/shm/gentoo
# How long to wait between syncs; must be a valid argument to sleep
ENV WAIT_TIME=10m
# This needs to exist in the container.
WORKDIR $DEST_DIR
# Expose Rsync port
EXPOSE 873
ENTRYPOINT /opt/rsync/wrap_rsync.sh
|