A Dockerized ready-to-use CTAN mirror
377
A Docker image for mirroring the CTAN, aka Comprehensive TeX Archive Network. Available on the Docker Hub as gutenberg/ctan-mirror.
This image is based on Alpine, use Nginx to serve CTAN directories and crontab with rsync for synching with the master CTAN archive.
You need (as of December, 2020) approximately 43 Go of available disk space to mirror the CTAN.
Run with Docker, binding on port 8080:
docker run -p 8080:80 gutenberg/ctan-mirror
You can then access the mirror on http://localhost:8080.
Note: for a server deployment, we suggest you launch the container a localhost port - and then reverse-proxy it to the domain name of your choice (eg. Nginx; Apache2).
| Env variable | Meaning | Default Value |
|---|---|---|
CTAN_RSYNC_MIRROR | The rsync mirror URI to sync from | rsync.dante.ctan.org/CTAN |
SYNC_CRON_PERIOD | The rsync cron periodicity | 42 6,12,18,23 * * * |
RANDOM_MODULO | Random modulo used to differ the sync script (used with $[RANDOM%<RANDOM_MODULO>]) | 179 |
For eg., to launch the CTAN mirror on port 8282, synchronizing each day at 3 am and mounting the archive directory to ./ctan_mirror, you can use:
docker run -p 8282:80 -e SYNC_CRON_PERIOD="0 3 * * *" -v ./ctan_mirror:/var/ctan_mirror gutenberg/ctan-mirror
To enable persistency of the synchronized CTAN data (and avoid losing the data on the container restarts), you should mount the container /var/ctan_mirror directory. You have two main choices:
-v /var/my_host_directory_for_ctan:/var/ctan_mirrormy_named_volume_ctan_mirror:/var/ctan_mirrorBuild image with Docker:
docker build -t gutenberg/ctan-mirror .
This image is brought to you by the GUTenberg team, the French user group of TeX, LaTeX and others.
Content type
Image
Digest
Size
10.1 MB
Last updated
almost 5 years ago
docker pull gutenberg/ctan-mirror