14 lines
546 B
Docker
14 lines
546 B
Docker
FROM ubuntu:24.04
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends apt-mirror ca-certificates rsync && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
COPY mirror.list /etc/apt/mirror.list
|
|
VOLUME ["/var/spool/apt-mirror"]
|
|
CMD bash -c 'mkdir -p /var/spool/apt-mirror/var; \
|
|
echo "[$(date -Is)] initial sync..." >&2; \
|
|
apt-mirror || true; \
|
|
while true; do \
|
|
echo "[$(date -Is)] periodic sync..." >&2; \
|
|
apt-mirror || true; \
|
|
sleep 12h; \
|
|
done' |