Turnkey public-mirror container. Bundles HTTP(S) (lighttpd), FTP(S) (vsftpd) and rsync in a single image so one host can serve a Linux-distribution mirror over all three protocols.
This is the image behind mirror.mdapi.ch, which carries BlackArch Linux and Gentoo Portage mirrors.
lighttpd+lighttpd-mod-openssl— HTTP(S) on 80/443vsftpd— anonymous FTP + FTPS on 21rsyncdaemon — rsync:// on 873cronjobs that pull from upstream mirrors twice an hour (sync-gpGentoo Portage,sync-baBlackArch)systemdas PID 1 so all four services run under unit supervision
Default landing page (index.html) documents the available mount points; robots.txt allows the landing page and blocks crawlers from the /ftp/ tree so multi-million-file package repos don't get indexed.
docker run -d \
--name mirror \
--tmpfs /run --tmpfs /tmp \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro \
-p 80:80 -p 443:443 -p 21:21 -p 873:873 \
-v /srv/mirror:/srv/ftp \
ghcr.io/MDAPI-Repos/mirror:latestThe container needs cgroups + tmpfs for systemd; mount your mirror storage at /srv/ftp (it gets bind-mounted to /var/www/html/ftp so HTTP and FTP see the same tree).
Adjust sync-gp/sync-ba and the crontab lines before building if you want different upstreams or a different schedule.
docker build -t mirror .When building in a CI that has a pull-through cache for Docker Hub (e.g. the GitLab dependency proxy), pass --build-arg REGISTRY=<cache-prefix>/ to route debian:stable through it.