You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
743 B
21 lines
743 B
FROM replaceme:latest
|
|
|
|
# Variables for URLs and versions
|
|
ARG CENTOS_VERSION=10 \
|
|
EPEL_VERSION=10 \
|
|
RSYNC_MIRROR=rsync://mirror.in2p3.fr \
|
|
CENTOS_PATH=/pub/linux/centos-stream \
|
|
EPEL_PATH=/pub/epel
|
|
|
|
# Copy exclusions file
|
|
COPY rsync-excludes.txt /etc/rsync-excludes.txt
|
|
|
|
# Build rsync options and sync repositories
|
|
RUN <<EOR
|
|
set -Eeuo pipefail
|
|
mkdir -p /var/www/centos/${CENTOS_VERSION}-stream
|
|
mkdir -p /var/www/epel/${EPEL_VERSION}
|
|
RSYNC_OPTS="-azH --progress --delete --exclude-from=/etc/rsync-excludes.txt"
|
|
rsync ${RSYNC_OPTS} ${RSYNC_MIRROR}${CENTOS_PATH}/${CENTOS_VERSION}-stream/ /var/www/centos/${CENTOS_VERSION}-stream/
|
|
rsync ${RSYNC_OPTS} ${RSYNC_MIRROR}${EPEL_PATH}/${EPEL_VERSION}/ /var/www/epel/${EPEL_VERSION}/
|
|
EOR
|
|
|