summaryrefslogtreecommitdiffstats
path: root/docker/apt_cacher
diff options
context:
space:
mode:
Diffstat (limited to 'docker/apt_cacher')
-rw-r--r--docker/apt_cacher/Dockerfile18
-rw-r--r--docker/apt_cacher/provision/assets/apt/preferences3
-rw-r--r--docker/apt_cacher/provision/assets/apt/sources.list4
-rw-r--r--docker/apt_cacher/provision/assets/config/acng.conf12
4 files changed, 37 insertions, 0 deletions
diff --git a/docker/apt_cacher/Dockerfile b/docker/apt_cacher/Dockerfile
new file mode 100644
index 0000000..edf3798
--- /dev/null
+++ b/docker/apt_cacher/Dockerfile
@@ -0,0 +1,18 @@
+FROM debian:wheezy
+MAINTAINER tails@boum.org
+
+VOLUME ["/var/cache/apt-cacher-ng"]
+
+COPY provision/assets/apt/sources.list /etc/apt/sources.list
+COPY provision/assets/apt/preferences /etc/apt/preferences.d/tails
+
+RUN apt-get update && \
+ apt-get upgrade --assume-yes && \
+ apt-get install --assume-yes --no-install-recommends \
+ apt-cacher-ng/wheezy-backports
+
+COPY provision/assets/config/acng.conf /etc/apt-cacher-ng/acng.conf
+
+EXPOSE 3142
+
+CMD /usr/sbin/apt-cacher-ng ForeGround=1 CacheDir=/var/cache/apt-cacher-ng
diff --git a/docker/apt_cacher/provision/assets/apt/preferences b/docker/apt_cacher/provision/assets/apt/preferences
new file mode 100644
index 0000000..4b685fc
--- /dev/null
+++ b/docker/apt_cacher/provision/assets/apt/preferences
@@ -0,0 +1,3 @@
+Package: *
+Pin: release o=Debian,n=wheezy
+Pin-Priority: 990
diff --git a/docker/apt_cacher/provision/assets/apt/sources.list b/docker/apt_cacher/provision/assets/apt/sources.list
new file mode 100644
index 0000000..97de362
--- /dev/null
+++ b/docker/apt_cacher/provision/assets/apt/sources.list
@@ -0,0 +1,4 @@
+deb http://ftp.us.debian.org/debian wheezy main
+deb http://security.debian.org/ wheezy/updates main
+deb http://ftp.us.debian.org/debian/ wheezy-updates main
+deb http://ftp.us.debian.org/debian wheezy-backports main
diff --git a/docker/apt_cacher/provision/assets/config/acng.conf b/docker/apt_cacher/provision/assets/config/acng.conf
new file mode 100644
index 0000000..f627bd4
--- /dev/null
+++ b/docker/apt_cacher/provision/assets/config/acng.conf
@@ -0,0 +1,12 @@
+CacheDir: /var/cache/apt-cacher-ng
+LogDir: /var/log/apt-cacher-ng
+Port:3142
+Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian
+Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu
+Remap-debvol: file:debvol_mirror*.gz /debian-volatile ; file:backends_debvol
+Remap-cygwin: file:cygwin_mirrors /cygwin # ; file:backends_cygwin # incomplete, please create this file
+ReportPage: acng-report.html
+ExTreshold: 4
+VfilePattern = (^|.*?/)(Index|Packages(\.gz|\.bz2|\.lzma|\.xz)?|InRelease|Release|Release\.gpg|Sources(\.gz|\.bz2|\.lzma|\.xz)?|release|index\.db-.*\.gz|Contents-[^/]*(\.gz|\.bz2|\.lzma|\.xz)?|pkglist[^/]*\.bz2|rclist[^/]*\.bz2|/meta-release[^/]*|Translation[^/]*(\.gz|\.bz2|\.lzma|\.xz)?|MD5SUMS|SHA1SUMS|((setup|setup-legacy)(\.ini|\.bz2|\.hint)(\.sig)?)|mirrors\.lst|repo(index|md)\.xml(\.asc|\.key)?|directory\.yast|products|content(\.asc|\.key)?|media|filelists\.xml\.gz|filelists\.sqlite\.bz2|repomd\.xml|packages\.[a-zA-Z][a-zA-Z]\.gz|info\.txt|license\.tar\.gz|license\.zip|.*\.db(\.tar\.gz)?|.*\.files\.tar\.gz|.*\.abs\.tar\.gz|metalink\?repo|.*prestodelta\.xml\.gz)$|/dists/.*/installer-[^/]+/[^0-9][^/]+/images/.*
+PfilePattern = .*(\.d?deb|\.rpm|\.dsc|\.tar(\.gz|\.bz2|\.lzma|\.xz)(\.gpg)?|\.diff(\.gz|\.bz2|\.lzma|\.xz)|\.o|\.jigdo|\.template|changelog|copyright|\.udeb|\.debdelta|\.diff/.*\.gz|(Devel)?ReleaseAnnouncement(\?.*)?|[a-f0-9]+-(susedata|updateinfo|primary|deltainfo).xml.gz|fonts/(final/)?[a-z]+32.exe(\?download.*)?|/dists/.*/installer-[^/]+/[0-9][^/]+/images/.*)$
+WfilePattern = (^|.*?/)(Release|InRelease|Release\.gpg|(Packages|Sources)(\.gz|\.bz2|\.lzma|\.xz)?|Translation[^/]*(\.gz|\.bz2|\.lzma|\.xz)?|MD5SUMS|SHA1SUMS|.*\.xml|.*\.db\.tar\.gz|.*\.files\.tar\.gz|.*\.abs\.tar\.gz|[a-z]+32.exe)$|/dists/.*/installer-.*/images/.*