Public | Automated Build

Last pushed: 10 months ago
Short Description
Short description is empty for this repo.
Full Description


Here you can see the general approach to setup and create your package mirror, which is explained afterwards

sudo docker create --name pkg_mirror -v /var/spool/apt-mirror ubuntu
sudo docker run --rm --volumes-from pkg_mirror thomass/apt-mirror
sudo docker run -it --name www_pkg_data --volumes-from pkg_mirror -v /usr/local/apache2/htdocs ubuntu bash
sudo docker run -d --name apache_mirror -p 8888:80 --volumes-from www_pkg_data httpd

Step 1:

You should keep all mirror files in a data volume container which is created here

Step 2:

The apt-mirror container downloads the current sources from and stores the data in the previously created data volume container.

The apt-mirror image has it's own mirror.list which can be overridden by mounting the file as volume to this container: -v mirror.list:/etc/apt/mirror.list

Step 3:

Later a webserver would offer the mirror data. Within this data volume container we map the directory /var/spool/apt-mirror to the content directory of the webserver, here /usr/local/apache2/htdocs. Inside the data volume container we have to run:

ln -s /var/spool/apt-mirror/mirror/ /usr/local/apache2/htdocs

Step 4:

The last step is offering the mirror data. Here we use the official docker httpd, which is grabbing it's public data from the linked volume under /usr/local/apache2/htdocs.


On the desired clients replace the URL inside your /etc/apt/sources.list with the one from the docker apache server. For instance:

sed -i s/<ipToDockerServer>:8888/g /etc/apt/sources.list


The whole repository is licenced under BSD. Please mention following: (thomass at

Docker Pull Command
Source Repository