Well dockerized, and portable APT mirror kit to build your own one easily.
Detailed guide & introduction are on here (written in Korean).
By default, Your local docker will build a new image for running APT mirror on your first-time launch. If you want to skip this process, You can modify
docker-compose
file to pullkycfeel/dockerized-apt-mirror
image from Docker Hub instead.
docker-compose up -d
This command will bring up every necessary components on your local machine with DEFAULT configuations.
- Mirror Ubuntu 16.04 LTS, 18.04 LTS, 19.04, 19.10.
- Sync archives every 1 hour.
To customize this setups, Please open mirror.list
and crontab/apt-mirror
files and reference the guide down below.
Once you open the mirror.list
file, You'll see bunch of URLs pre-defined on it. Those are the URLs for reaching official Ubuntu archive for downloading packages. Following names right behind of URLs are the version names of Ubuntu distros (xenial, bionic, etc... ).
The names you can see behind of Ubuntu distro versions, such as restricted
, main
, universe
, those are for specifying different software repository to mirror. You can check the details on here.
You can change these values on the file based on your needs and situation. Such as changing archive URLs to different mirror which is more physically closer to you, or removing support for restricted
packages.
crontab/apt-mirror
is a simple crontab
rule for periodically running apt-mirror
pull to syncronize local mirror's data as same as remote archive's one.
By default, Crontab rule is set as 0 4 * * *
, which means run apt-mirror
pull in every 04:00 (everyday). You can modify this value to whatever you want. For setting up crontab rule easily, good to also reference crontab.guru.
docker-compose down
Easy!
The mirror that I'm personally running is using latest version of this repository. Isn't it a perfect live-demo? 😄
http://mirror.dokupe.xyz/ubuntu/
- Ubuntu 16.04 LTS
- Ubuntu 18.04 LTS
- Ubuntu 19.04
- Ubuntu 19.10
- HTTP / HTTPS support
- Syncing every 1 hour directly from archive.ubuntu.com.