Last active
May 5, 2021 15:16
-
-
Save johnzielke/da6e82e39235f70baee95d699c23b96b to your computer and use it in GitHub Desktop.
Apt proxy (for docker)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Install apt-cacher before https://wiki.ubuntuusers.de/Lokale_Paketquellen/Apt-Cacher-ng/ | |
// Run with docker build --network="host" | |
// https://stackoverflow.com/questions/47067944/how-to-access-the-hosts-machines-localhost-127-0-0-1-from-docker-container | |
//Copy to /etc/apt/apt.conf.d/ | |
Acquire::http { Proxy "http://localhost:3142"; }; | |
Acquire::https { Proxy "https://"; }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
version: '3' | |
services: | |
apt-cacher-ng: | |
image: sameersbn/apt-cacher-ng | |
container_name: apt-cacher-ng | |
network_mode: "host" | |
volumes: | |
- apt-cacher-ng:/var/cache/apt-cacher-ng | |
restart: always | |
volumes: | |
apt-cacher-ng: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment