https://github.com/konstruktoid/container-aptcacherng-build
Apt-Cacher NG
https://github.com/konstruktoid/container-aptcacherng-build
Last synced: 6 months ago
JSON representation
Apt-Cacher NG
- Host: GitHub
- URL: https://github.com/konstruktoid/container-aptcacherng-build
- Owner: konstruktoid
- Created: 2015-11-08T21:14:04.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2025-04-24T21:40:37.000Z (6 months ago)
- Last Synced: 2025-04-24T22:41:21.927Z (6 months ago)
- Language: Dockerfile
- Size: 113 KB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Apt-Cacher NG
[https://www.unix-ag.uni-kl.de/~bloch/acng/](https://www.unix-ag.uni-kl.de/~bloch/acng/)
## Usage
```sh
docker run -d --cap-drop=all --name apt-cacher-ng -p 3142:3142 konstruktoid/apt-cacher-ng VerboseLog=1 Debug=7 PassThroughPattern=.*
curl -s 127.0.0.1:3142/acng-report.html
```
### Manual build
```sh
docker build --no-cache --tag konstruktoid/apt-cacher-ng:latest -f Dockerfile .
docker run -d --cap-drop=all --name apt-cacher-ng -p 3142:3142 konstruktoid/apt-cacher-ng VerboseLog=1 Debug=7 PassThroughPattern=.*
curl -s 127.0.0.1:3142/acng-report.html
```
### Example /etc/apt/apt.conf.d/01proxy script
```sh
#!/bin/bash
set -eu
set -o pipefail
PROTO="ftp http https"
CIP=$(docker inspect -f '{{.NetworkSettings.IPAddress}}' apt-cacher-ng)
for p in $PROTO; do
PROXY_ACQUIRE="Acquire::$p { Proxy \"http://$CIP:3142\"; }"
if [[ -d /etc/apt/apt.conf.d ]]; then
echo "${PROXY_ACQUIRE}" | \
sudo tee --append /etc/apt/apt.conf.d/01proxy
else
echo "${PROXY_ACQUIRE}"
fi
done
```