Skip to content

Commit 328d3e4

Browse files
committed
Add plain build and au, uk, us specific
Plain build has no opinions on backends unless they are cdn that do geo for you au, uk, us set backends to local mirrors
1 parent 40cdb96 commit 328d3e4

27 files changed

+489
-26
lines changed

Dockerfile.au

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM deployable/acng:latest
2+
3+
ENV ACNG_LOCALE="au"
4+
5+
RUN set -uex; \
6+
if [ -n "$ACNG_LOCALE" ]; then \
7+
cp /etc/apt-cacher-ng/acng.conf.$ACNG_LOCALE /etc/apt-cacher-ng/acng.conf; \
8+
fi; \

Dockerfile.uk

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM deployable/acng:latest
2+
3+
ENV ACNG_LOCALE="uk"
4+
5+
RUN set -uex; \
6+
if [ -n "$ACNG_LOCALE" ]; then \
7+
cp /etc/apt-cacher-ng/acng.conf.$ACNG_LOCALE /etc/apt-cacher-ng/acng.conf; \
8+
fi; \

Dockerfile.us

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM deployable/acng:latest
2+
3+
ENV ACNG_LOCALE="us"
4+
5+
RUN set -uex; \
6+
if [ -n "$ACNG_LOCALE" ]; then \
7+
cp /etc/apt-cacher-ng/acng.conf.$ACNG_LOCALE /etc/apt-cacher-ng/acng.conf; \
8+
fi; \

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Apt-Cacher NG is a caching proxy for linux distribution packages, primarily Debian. https://www.unix-ag.uni-kl.de/~bloch/acng/
44

5-
The containers apt-cacher-ng config adds support for:
5+
The container apt-cacher-ng config adds support for:
66

77
- Alpine Linux packages from http://dl-cdn.alpinelinux.org
88
- Centos from https://mirrors.centos.org/ - edit `files/backends_centos`
@@ -53,5 +53,5 @@ Delete the `backends_*` files if you don't want acng to push all request to sele
5353

5454
## About
5555

56-
Matt Hoyle - code@deployable.co
56+
Matt Hoyle - code atat deployable.co
5757

files/acng.conf

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ LogDir: /var/log/apt-cacher-ng
44
Port: 3142
55
# BindAddress: localhost 192.168.7.254 publicNameOnMainInterface
66
Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian # Debian Archives
7-
Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu # Ubuntu Archives
7+
Remap-uburep: file:ubuntu_mirrors /ubuntu # Ubuntu Archives
88
Remap-cygwin: file:cygwin_mirrors /cygwin # ; file:backends_cygwin # incomplete, please create this file or specify preferred mirrors here
99
Remap-alxrep: file:archlx_mirrors /archlinux # ; file:backend_archlx # Arch Linux
1010
Remap-centosmirrorlist: mirrorlist.centos.org
11-
Remap-centos: file:centos_mirrors ; file:backends_centos # Fedora Linux
12-
Remap-fedora: file:fedora_mirrors ; file:backends_fedora # Fedora Linux
13-
Remap-epel: file:epel_mirrors ; file:backends_epel # Fedora EPEL
11+
Remap-centos: file:centos_mirrors # Fedora Linux
12+
Remap-fedora: file:fedora_mirrors # Fedora Linux
13+
Remap-epel: file:epel_mirrors # Fedora EPEL
1414
Remap-slrep: file:sl_mirrors # Scientific Linux
1515
Remap-gentoo: file:gentoo_mirrors.gz /gentoo ; file:backends_gentoo # Gentoo Archives
1616
#Remap-alpine: file:alpine_mirrors /alpine #; dl-cdn.alpinelinux.org # Alpine Archives
1717
Remap-alpine: dl-cdn.alpinelinux.org
1818
Remap-yarn: registry.yarnpkg.com
1919
Remap-npm: registry.npmjs.org
2020
Remap-node: nodejs.org
21-
Remap-apache: file:apache_mirrors ; file:backends_apache
21+
Remap-apache: file:apache_mirrors #; file:backends_apache
2222
# Remap-secdeb: security.debian.org
2323
ReportPage: acng-report.html
2424
# SocketPath:/var/run/apt-cacher-ng/socket

files/acng.conf.au

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# This is a configuration file for apt-cacher-ng, a smart caching proxy for
2+
CacheDir: /var/cache/apt-cacher-ng
3+
LogDir: /var/log/apt-cacher-ng
4+
Port: 3142
5+
# BindAddress: localhost 192.168.7.254 publicNameOnMainInterface
6+
Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian # Debian Archives
7+
Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu.au # Ubuntu Archives
8+
Remap-cygwin: file:cygwin_mirrors /cygwin # ; file:backends_cygwin # incomplete, please create this file or specify preferred mirrors here
9+
Remap-alxrep: file:archlx_mirrors /archlinux # ; file:backend_archlx # Arch Linux
10+
Remap-centosmirrorlist: mirrorlist.centos.org
11+
Remap-centos: file:centos_mirrors ; file:backends_centos.au # Fedora Linux
12+
Remap-fedora: file:fedora_mirrors ; file:backends_fedora.au # Fedora Linux
13+
Remap-epel: file:epel_mirrors ; file:backends_epel.au # Fedora EPEL
14+
Remap-slrep: file:sl_mirrors # Scientific Linux
15+
Remap-gentoo: file:gentoo_mirrors.gz /gentoo ; file:backends_gentoo # Gentoo Archives
16+
#Remap-alpine: file:alpine_mirrors /alpine #; dl-cdn.alpinelinux.org # Alpine Archives
17+
Remap-alpine: dl-cdn.alpinelinux.org
18+
Remap-yarn: registry.yarnpkg.com
19+
Remap-npm: registry.npmjs.org
20+
Remap-node: nodejs.org
21+
Remap-apache: file:apache_mirrors ; file:backends_apache.au
22+
# Remap-secdeb: security.debian.org
23+
ReportPage: acng-report.html
24+
# SocketPath:/var/run/apt-cacher-ng/socket
25+
UnbufferLogs: 1
26+
VerboseLog: 2
27+
ForeGround: 1
28+
# PidFile: /var/run/apt-cacher-ng/pid
29+
# Offlinemode: 0
30+
# ForceManaged: 0
31+
ExTreshold: 8
32+
# ExAbortOnProblems: 1
33+
# ExSuppressAdminNotification: 1
34+
# StupidFs: 0
35+
# ForwardBtsSoap: 1
36+
# DnsCacheSeconds: 1800
37+
# MaxStandbyConThreads: 8
38+
MaxConThreads: 120
39+
#
40+
# - static data that doesn't change silently ont he server (PFilePattern)
41+
# - volatile data that can be changed like every hour (VFilePattern)
42+
# - special static data that shared some file names with volatile data,
43+
# and in doubt should be identified as static (SPfilePattern)
44+
# - a "whitelist pattern" with hints for the regular expiration job telling
45+
# to keep the files even if they are not referenced by others, like crypto
46+
# signatures with which clients begin their downloads (WfilePattern)
47+
#
48+
VfilePatternEx: (metalink\?repo=[0-9a-zA-Z-]+&arch=[0-9a-zA-Z_-]+|/\?release=[0-9]+&arch=|repodata/.*\.(xml|sqlite)\.(gz|bz2)|APKINDEX.tar.gz|filelists\.xml\.gz|filelists\.sqlite\.bz2|repomd\.xml|packages\.[a-zA-Z][a-zA-Z]\.gz)
49+
PfilePatternEx: (/dists/.*/by-hash/.*|\.tgz|\.tar|\.xz|\.bz2|\.rpm|\.apk)$
50+
# WfilePatternEx:
51+
# SPfilePatternEx:
52+
53+
Debug:1
54+
# ExposeOrigin: 0
55+
# LogSubmittedOrigin: 0
56+
# UserAgent: Yet Another HTTP Client/1.2.3p4
57+
# RecompBz2: 0
58+
# NetworkTimeout: 60
59+
60+
# DontCacheRequested: linux-.*_10\...\.Custo._i386
61+
# DontCacheRequested: 192.168.0 ^10\..* 172.30
62+
# DontCacheResolved: ubuntumirror.local.net
63+
DontCache: mirrorlist.centos.org
64+
65+
# DirPerms: 00755
66+
# FilePerms: 00664
67+
68+
LocalDirs: acng-doc /usr/share/doc/apt-cacher-ng
69+
# PrecacheFor: debrep/dists/unstable/*/source/Sources* debrep/dists/unstable/*/binary-amd64/Packages*
70+
# RequestAppendix: X-Tracking-Choice: do-not-track\r\n
71+
# ConnectProto: v6 v4
72+
# KeepExtraVersions: 0
73+
# UseWrap: 0
74+
FreshIndexMaxAge: 300
75+
# AllowUserPorts: 80
76+
RedirMax: 6
77+
# VfileUseRangeOps is set for fedora volatile files on mirrors that dont to range
78+
VfileUseRangeOps: 0
79+
# PassThroughPattern: private-ppa\.launchpad\.net:443$
80+
# PassThroughPattern: .* # this would allow CONNECT to everything
81+
PassThroughPattern: (download\.docker\.com:443|registry\.npmjs\.org:443|registry\.yarnpkg\.com:443)$ # yarn/npm pkg, cant to http :/
82+
# ResponseFreezeDetectTime: 500
83+
# ReuseConnections: 1
84+
# PipelineDepth: 255
85+
# CApath: /etc/ssl/certs
86+
# CAfile:
87+
# OptProxyTimeout: -1
88+
# MaxDlSpeed: 500
89+
# MaxInresponsiveDlSize: 64000
90+
# BadRedirDetectMime: text/html

files/acng.conf.uk

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# This is a configuration file for apt-cacher-ng, a smart caching proxy for
2+
CacheDir: /var/cache/apt-cacher-ng
3+
LogDir: /var/log/apt-cacher-ng
4+
Port: 3142
5+
# BindAddress: localhost 192.168.7.254 publicNameOnMainInterface
6+
Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian # Debian Archives
7+
Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu.uk # Ubuntu Archives
8+
Remap-cygwin: file:cygwin_mirrors /cygwin # ; file:backends_cygwin # incomplete, please create this file or specify preferred mirrors here
9+
Remap-alxrep: file:archlx_mirrors /archlinux # ; file:backend_archlx # Arch Linux
10+
Remap-centosmirrorlist: mirrorlist.centos.org
11+
Remap-centos: file:centos_mirrors ; file:backends_centos.uk # Fedora Linux
12+
Remap-fedora: file:fedora_mirrors ; file:backends_fedora.uk # Fedora Linux
13+
Remap-epel: file:epel_mirrors ; file:backends_epel.uk # Fedora EPEL
14+
Remap-slrep: file:sl_mirrors # Scientific Linux
15+
Remap-gentoo: file:gentoo_mirrors.gz /gentoo ; file:backends_gentoo # Gentoo Archives
16+
#Remap-alpine: file:alpine_mirrors /alpine #; dl-cdn.alpinelinux.org # Alpine Archives
17+
Remap-alpine: dl-cdn.alpinelinux.org
18+
Remap-yarn: registry.yarnpkg.com
19+
Remap-npm: registry.npmjs.org
20+
Remap-node: nodejs.org
21+
Remap-apache: file:apache_mirrors ; file:backends_apache.uk
22+
# Remap-secdeb: security.debian.org
23+
ReportPage: acng-report.html
24+
# SocketPath:/var/run/apt-cacher-ng/socket
25+
UnbufferLogs: 1
26+
VerboseLog: 2
27+
ForeGround: 1
28+
# PidFile: /var/run/apt-cacher-ng/pid
29+
# Offlinemode: 0
30+
# ForceManaged: 0
31+
ExTreshold: 8
32+
# ExAbortOnProblems: 1
33+
# ExSuppressAdminNotification: 1
34+
# StupidFs: 0
35+
# ForwardBtsSoap: 1
36+
# DnsCacheSeconds: 1800
37+
# MaxStandbyConThreads: 8
38+
MaxConThreads: 120
39+
#
40+
# - static data that doesn't change silently ont he server (PFilePattern)
41+
# - volatile data that can be changed like every hour (VFilePattern)
42+
# - special static data that shared some file names with volatile data,
43+
# and in doubt should be identified as static (SPfilePattern)
44+
# - a "whitelist pattern" with hints for the regular expiration job telling
45+
# to keep the files even if they are not referenced by others, like crypto
46+
# signatures with which clients begin their downloads (WfilePattern)
47+
#
48+
VfilePatternEx: (metalink\?repo=[0-9a-zA-Z-]+&arch=[0-9a-zA-Z_-]+|/\?release=[0-9]+&arch=|repodata/.*\.(xml|sqlite)\.(gz|bz2)|APKINDEX.tar.gz|filelists\.xml\.gz|filelists\.sqlite\.bz2|repomd\.xml|packages\.[a-zA-Z][a-zA-Z]\.gz)
49+
PfilePatternEx: (/dists/.*/by-hash/.*|\.tgz|\.tar|\.xz|\.bz2|\.rpm|\.apk)$
50+
# WfilePatternEx:
51+
# SPfilePatternEx:
52+
53+
Debug:1
54+
# ExposeOrigin: 0
55+
# LogSubmittedOrigin: 0
56+
# UserAgent: Yet Another HTTP Client/1.2.3p4
57+
# RecompBz2: 0
58+
# NetworkTimeout: 60
59+
60+
# DontCacheRequested: linux-.*_10\...\.Custo._i386
61+
# DontCacheRequested: 192.168.0 ^10\..* 172.30
62+
# DontCacheResolved: ubuntumirror.local.net
63+
DontCache: mirrorlist.centos.org
64+
65+
# DirPerms: 00755
66+
# FilePerms: 00664
67+
68+
LocalDirs: acng-doc /usr/share/doc/apt-cacher-ng
69+
# PrecacheFor: debrep/dists/unstable/*/source/Sources* debrep/dists/unstable/*/binary-amd64/Packages*
70+
# RequestAppendix: X-Tracking-Choice: do-not-track\r\n
71+
# ConnectProto: v6 v4
72+
# KeepExtraVersions: 0
73+
# UseWrap: 0
74+
FreshIndexMaxAge: 300
75+
# AllowUserPorts: 80
76+
RedirMax: 6
77+
# VfileUseRangeOps is set for fedora volatile files on mirrors that dont to range
78+
VfileUseRangeOps: 0
79+
# PassThroughPattern: private-ppa\.launchpad\.net:443$
80+
# PassThroughPattern: .* # this would allow CONNECT to everything
81+
PassThroughPattern: (download\.docker\.com:443|registry\.npmjs\.org:443|registry\.yarnpkg\.com:443)$ # yarn/npm pkg, cant to http :/
82+
# ResponseFreezeDetectTime: 500
83+
# ReuseConnections: 1
84+
# PipelineDepth: 255
85+
# CApath: /etc/ssl/certs
86+
# CAfile:
87+
# OptProxyTimeout: -1
88+
# MaxDlSpeed: 500
89+
# MaxInresponsiveDlSize: 64000
90+
# BadRedirDetectMime: text/html

files/acng.conf.us

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# This is a configuration file for apt-cacher-ng, a smart caching proxy for
2+
CacheDir: /var/cache/apt-cacher-ng
3+
LogDir: /var/log/apt-cacher-ng
4+
Port: 3142
5+
# BindAddress: localhost 192.168.7.254 publicNameOnMainInterface
6+
Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian # Debian Archives
7+
Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu.us # Ubuntu Archives
8+
Remap-cygwin: file:cygwin_mirrors /cygwin # ; file:backends_cygwin # incomplete, please create this file or specify preferred mirrors here
9+
Remap-alxrep: file:archlx_mirrors /archlinux # ; file:backend_archlx # Arch Linux
10+
Remap-centosmirrorlist: mirrorlist.centos.org
11+
Remap-centos: file:centos_mirrors ; file:backends_centos.us # Fedora Linux
12+
Remap-fedora: file:fedora_mirrors ; file:backends_fedora.us # Fedora Linux
13+
Remap-epel: file:epel_mirrors ; file:backends_epel.us # Fedora EPEL
14+
Remap-slrep: file:sl_mirrors # Scientific Linux
15+
Remap-gentoo: file:gentoo_mirrors.gz /gentoo ; file:backends_gentoo # Gentoo Archives
16+
#Remap-alpine: file:alpine_mirrors /alpine #; dl-cdn.alpinelinux.org # Alpine Archives
17+
Remap-alpine: dl-cdn.alpinelinux.org
18+
Remap-yarn: registry.yarnpkg.com
19+
Remap-npm: registry.npmjs.org
20+
Remap-node: nodejs.org
21+
Remap-apache: file:apache_mirrors ; file:backends_apache.us
22+
# Remap-secdeb: security.debian.org
23+
ReportPage: acng-report.html
24+
# SocketPath:/var/run/apt-cacher-ng/socket
25+
UnbufferLogs: 1
26+
VerboseLog: 2
27+
ForeGround: 1
28+
# PidFile: /var/run/apt-cacher-ng/pid
29+
# Offlinemode: 0
30+
# ForceManaged: 0
31+
ExTreshold: 8
32+
# ExAbortOnProblems: 1
33+
# ExSuppressAdminNotification: 1
34+
# StupidFs: 0
35+
# ForwardBtsSoap: 1
36+
# DnsCacheSeconds: 1800
37+
# MaxStandbyConThreads: 8
38+
MaxConThreads: 120
39+
#
40+
# - static data that doesn't change silently ont he server (PFilePattern)
41+
# - volatile data that can be changed like every hour (VFilePattern)
42+
# - special static data that shared some file names with volatile data,
43+
# and in doubt should be identified as static (SPfilePattern)
44+
# - a "whitelist pattern" with hints for the regular expiration job telling
45+
# to keep the files even if they are not referenced by others, like crypto
46+
# signatures with which clients begin their downloads (WfilePattern)
47+
#
48+
VfilePatternEx: (metalink\?repo=[0-9a-zA-Z-]+&arch=[0-9a-zA-Z_-]+|/\?release=[0-9]+&arch=|repodata/.*\.(xml|sqlite)\.(gz|bz2)|APKINDEX.tar.gz|filelists\.xml\.gz|filelists\.sqlite\.bz2|repomd\.xml|packages\.[a-zA-Z][a-zA-Z]\.gz)
49+
PfilePatternEx: (/dists/.*/by-hash/.*|\.tgz|\.tar|\.xz|\.bz2|\.rpm|\.apk)$
50+
# WfilePatternEx:
51+
# SPfilePatternEx:
52+
53+
Debug:1
54+
# ExposeOrigin: 0
55+
# LogSubmittedOrigin: 0
56+
# UserAgent: Yet Another HTTP Client/1.2.3p4
57+
# RecompBz2: 0
58+
# NetworkTimeout: 60
59+
60+
# DontCacheRequested: linux-.*_10\...\.Custo._i386
61+
# DontCacheRequested: 192.168.0 ^10\..* 172.30
62+
# DontCacheResolved: ubuntumirror.local.net
63+
DontCache: mirrorlist.centos.org
64+
65+
# DirPerms: 00755
66+
# FilePerms: 00664
67+
68+
LocalDirs: acng-doc /usr/share/doc/apt-cacher-ng
69+
# PrecacheFor: debrep/dists/unstable/*/source/Sources* debrep/dists/unstable/*/binary-amd64/Packages*
70+
# RequestAppendix: X-Tracking-Choice: do-not-track\r\n
71+
# ConnectProto: v6 v4
72+
# KeepExtraVersions: 0
73+
# UseWrap: 0
74+
FreshIndexMaxAge: 300
75+
# AllowUserPorts: 80
76+
RedirMax: 6
77+
# VfileUseRangeOps is set for fedora volatile files on mirrors that dont to range
78+
VfileUseRangeOps: 0
79+
# PassThroughPattern: private-ppa\.launchpad\.net:443$
80+
# PassThroughPattern: .* # this would allow CONNECT to everything
81+
PassThroughPattern: (download\.docker\.com:443|registry\.npmjs\.org:443|registry\.yarnpkg\.com:443)$ # yarn/npm pkg, cant to http :/
82+
# ResponseFreezeDetectTime: 500
83+
# ReuseConnections: 1
84+
# PipelineDepth: 255
85+
# CApath: /etc/ssl/certs
86+
# CAfile:
87+
# OptProxyTimeout: -1
88+
# MaxDlSpeed: 500
89+
# MaxInresponsiveDlSize: 64000
90+
# BadRedirDetectMime: text/html
File renamed without changes.

files/backends_apache.uk

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apache.mirror.anlx.net
2+
mirror.vorboss.net
3+
www.mirrorservice.org
4+
mirror.ox.ac.uk
5+
apache.mirrors.nublue.co.uk
6+
mirrors.ukfast.co.uk

files/backends_apache.us

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
http://mirror.cogentco.com/pub/apache/
2+
http://mirrors.gigenet.com/apache/
3+
http://mirrors.koehn.com/apache/
4+
http://download.nextag.com/apache/
5+
http://apache.mirrors.pair.com/
6+
http://mirrors.sorengard.com/apache/
7+
http://mirrors.ocf.berkeley.edu/apache/
8+
http://mirror.cc.columbia.edu/pub/software/apache/
9+
http://apache.mirrors.lucidnetworks.net/
10+
http://mirror.metrocast.net/apache/
11+
http://mirror.olnevhost.net/pub/apache/
12+
http://mirrors.sonic.net/apache/
13+
http://apache.mirrors.tds.net/
14+
http://apache.claz.org/
15+
http://mirrors.ibiblio.org/apache/
16+
http://apache.mirrors.ionfish.org/
17+
http://apache.osuosl.org/
18+
http://mirror.stjschools.org/public/apache/
File renamed without changes.

files/backends_centos.uk

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
http://centos.mirror.serversaustralia.com.au/
2+
http://mirror.aarnet.edu.au/pub/centos/
3+
http://mirror.optus.net/centos/
4+
http://mirror.colocity.com/centos/

files/backends_centos.us

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
http://centos.mirror.serversaustralia.com.au/
2+
http://mirror.aarnet.edu.au/pub/centos/
3+
http://mirror.optus.net/centos/
4+
http://mirror.colocity.com/centos/
File renamed without changes.

files/backends_epel.uk

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
http://mirror.sax.uk.as61049.net/epel
2+
http://mirror.bytemark.co.uk/fedora/epel
3+
http://mirror.freethought-internet.co.uk/epel
4+
http://mirrors.coreix.net/fedora-epel
5+
http://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel
6+
http://mirrors.ukfast.co.uk/sites/dl.fedoraproject.org/pub/epel
7+
http://mirror.vorboss.net/fedora/epel
8+
http://uk-mirrors.evowise.com/epel

0 commit comments

Comments
 (0)