This is my pre-configured docker container for running apt-cacher-ng. It’s not much, but it comes with a few things that may be of interest. In particular, it pre-configures some repositories, some pre-caching, and setting offline mode for now. It also exposes an import volume for other containers, that can be used to trigger an import of the packages in the import directory into the cache. And I am way too tired to write this right now.
http://us.mirror.devuan.org/merged
http://us.mirror.devuan.org/devuan
http://packages.devuan.org/merged
http://packages.devuan.org/devuan
/etc/apt-cacher-ng/backends_devuan
Remap-devrep: file:devuan_mirror /merged ; file:backends_devuan # Devuan Archives
/etc/apt-cacher-ng/acng.conf
https://deb.torproject.org/torproject.org
/etc/apt-cacher-ng/backends_tor
Remap-tor: http://tor.repo ; file:backends_tor
PrecacheFor: tor/*/*/*/*/Packages*"
/etc/apt-cacher-ng/acng.conf
https://pkg.tox.chat/debian"
/etc/apt-cacher-ng/backends_tox
Remap-tox: http://tox.repo ; file:backends_tox"
PrecacheFor: tox/*/*/*/*/Packages*"
/etc/apt-cacher-ng/acng.conf
https://apt.syncthing.net/
/etc/apt-cacher-ng/backends_syncthing
Remap-syncthing: http://syncthing.repo ; file:backends_syncthing
PrecacheFor: syncthing/*/*/*/*/Packages*
/etc/apt-cacher-ng/acng.conf
https://repo.lngserv.ru/debian"
/etc/apt-cacher-ng/backends_i2pd
Remap-i2pd: http://i2p.repo ; file:backends_i2pd
PrecacheFor: i2pd/*/*/*/*/Packages*
/etc/apt-cacher-ng/acng.conf
https://download.opensuse.org/repositories/home:/emby/Debian_Next/"
/etc/apt-cacher-ng/backends_emby
Remap-emby: http://emby.repo ; file:backends_emby"
PrecacheFor: emby/*/*/*/*/Packages*"
/etc/apt-cacher-ng/acng.conf
https://download.opensuse.org/repositories/home:/stevenpusser/Debian_9.0/
/etc/apt-cacher-ng/backends_palemoon
Remap-palemoon: http://palemoon.repo ; file:backends_palemoon"
PrecacheFor: palemoon/*/*/*/*/Packages*"
/etc/apt-cacher-ng/acng.conf
Instead of switching between offline and online apt proxy modes manually, this setup uses two containers that work from the same data. They simply have slightly different configuration files, in this setup, the online proxy contains the settings:
offlinemode:0
Port:3142
and the offline proxy contains the settings:
offlinemode:1
Port:3143
Otherwise, the two are exactly identical.
This is a script for Auto-Apt-Proxy which prioritizes the online apt-cacher-ng instance, but falls back to an offline apt-cacher-ng instance.
Figuring this out still. Doing it from this mostly.