Skip to content
Dockerised Pacman Proxy Cache
Dockerfile Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

What is PacCache?

A caching package proxy for Pacman (Arch Linux) (although it probably can be adjusted for any package manager).


If you have multiple Arch Linux machines on your network; using this image can help speed up downloads and reduce network consumption.

How does it work?

It's really just a fancy NGINX Config adapted from this.

Once properly setup, when the Container recieves a request for a package that isn't present locally, it downloads it from the primary mirror and saves the .pkg.tar.xz file to disk.

Any requests for .db or .sig files are always sent upstream to the mirror.

How do I use it?

docker run -d --name --paccache -p 8080:8080 -v /path/to/data/dir:/cache:rw -e okamidash/paccache

Environment Variables

  • DNS_SERVER DNS Server to use for NGINX. You can change this to any DNS you want.


  • SERVER_NAMEDomain Name/IP of Container. The default will respond to all requests.

    default: _

  • PRIMARY_MIRROR Primary mirror to use for proxying requests. It is recommended to change this.


  • BACKUP_MIRROR Backup mirror incase the primary mirror is down.


Changing the Default Mirrors

It is recommended that you change the default mirrors to ones that are closer to you.

Currently the Docker Container only supports ipv4 http and https, no Rsync or ftp yet.

To change them, I would suggest using Reflector.

Something like reflector -p http -p https -l 50 --ipv4 -f 10 --sort rate will return the 10 fastest mirrors.

You will get a result like this.

Server =$repo/os/$arch
Server =$repo/os/$arch
Server =$repo/os/$arch
Server =$repo/os/$arch
Server =$repo/os/$arch

You only need to trim everything from $repo onwards; so$repo/os/$arch will be and$repo/os/$arch becomes

Configuring /etc/pacman.d/mirrorlist

Server = http://container_ip:container_port/$repo/os/$arch

Example using a container IP of, and -p 8080:8080

Server =$repo/os/$arch

Need help?

If you need any help, feel free to email me

okami @

This is my first Docker Image, and I had help from friends building it; so I can't promise i'll be helpful.

Thanks to

You can’t perform that action at this time.