Skip to main content

allow package installations to stay local at another docker container

Project description

docker mirror packages repo

Allows to simulate upstream centos / ubuntu / opensuse package repository servers by using a docker container which contains a local package mirror.

The scripts in this project allow to build a local package mirror using rsync. When ready the rpm/deb packages get copied into a docker image which has a small web script that mimics the mirrorlist function of the original upstream package repository servers.

There is a helper script docker_mirror which can start a mirror docker image as container. The --add-hosts option prints the line for "docker run" so that calls to the original upstream package server get diverted to the ip address of the locally running docker container.

Effectively all "yum install" or "zypper install" or "apt-get install" commands run locally in the docker network. No internet access required. Without changing repo files. Without special proxy host setups. This is faster, allows for reproducible install tests, and it can be used in a disconnected environment.

The scripting has also been used with docker-compose and ansible deployment setups. Over the years a number of package repos have been tested - starting with distros from 2016 until today. Even when the upstream package repositories get disabled, for being out of support, the local docker mirrors continue to work.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docker-mirror-packages-repo-1.7.6334.tar.gz (47.4 kB view details)

Uploaded Source

File details

Details for the file docker-mirror-packages-repo-1.7.6334.tar.gz.

File metadata

  • Download URL: docker-mirror-packages-repo-1.7.6334.tar.gz
  • Upload date:
  • Size: 47.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.15

File hashes

Hashes for docker-mirror-packages-repo-1.7.6334.tar.gz
Algorithm Hash digest
SHA256 a30c0d9c52419208ec3b6f9c7ce1d412964758519232ed917cbb5ac5f93f5861
MD5 8dc537139959ae9b289cadb56ddab28b
BLAKE2b-256 79ab79e09e7cda4aa84b128631bd807ca7ae34b9aaf670b40008d3479485db31

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page