Skip to content

Proxy for caching .rpm and .deb packages from Linux repository mirrors.

Notifications You must be signed in to change notification settings

cybercinch/docker.proxy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linux Package Proxy Cache

Proxy server intended for caching .rpm and .deb packages from a Linux repository mirror.

Usage

Run proxy container

$ docker run \
	--name="packages" \
	--rm=true \
	--volume=repository-package-cache:/var/cache/nginx:Z \
	docker.io/aesiniath/proxy:latest

runs in foreground and logs when requests hit its cache. In this repo this command is conveniently contained in ./run.sh so:

$ ./run.sh

Change configuration of new images

Change the repository configurations in your base image to point to the internal package mirror:

Fedora

In /etc/yum.repos.d/ adjust fedora.repo to have:

baseurl=http://127.0.0.1:1999/fedora/linux/releases/$releasever/Everything/$basearch/os/

and in fedora-updates.repo to have:

baseurl=http://127.0.0.1:1999/fedora/linux/updates/$releasever/$basearch/

Debian

Adjust /etc/apt/sources.list to have:

deb http://127.0.0.1:1999/debian/ stretch main
deb http://127.0.0.1:1999/debian/ stretch-updates main

Use normally

Build on a Fedora base image:

$ docker run -i -t --rm --network="proxy" localhost/afcowie/fedora:27 bash
ab317b9920d3 / # dnf install -y findutils
...

or building on a Debian base image:

$ docker run -i -t --rm docker.io/aesiniath/debian:stretch bash
d874ac8dd5d4 / # apt-get install findutils
...

Enjoy!

Bugs

See TODO.

Acknowledgements

This container was set up based on incredibly helpful posts from:

About

Proxy for caching .rpm and .deb packages from Linux repository mirrors.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 52.9%
  • Shell 47.1%