Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/konstruktoid/container-aptcacherng-build
Apt-Cacher NG
https://github.com/konstruktoid/container-aptcacherng-build
Last synced: 11 days 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 9 years ago)
- Default Branch: master
- Last Pushed: 2024-10-04T11:20:12.000Z (about 1 month ago)
- Last Synced: 2024-10-04T19:42:55.774Z (about 1 month ago)
- Language: Dockerfile
- Size: 89.8 KB
- Stars: 6
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
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/bashset -eu
set -o pipefailPROTO="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
```