-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an APT cache proxy option and dev container
Add a Debian stable based container using apt-cacher-ng to the `dev/docker-compose.yml` environment. Add an option to configure an APT cache proxy to the installation.
- Loading branch information
1 parent
e4efe46
commit 06d0ca0
Showing
5 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Adapted from https://docs.docker.com/engine/examples/apt-cacher-ng/ | ||
# | ||
# Build: docker build -t apt-cacher . | ||
# Run: docker run -d -p 3142:3142 --name apt-cacher-run apt-cacher | ||
# | ||
# and then you can run containers with: | ||
# docker run -t -i --rm -e http_proxy http://dockerhost:3142/ debian bash | ||
# | ||
# Here, `dockerhost` is the IP address or FQDN of a host running the Docker daemon | ||
# which acts as an APT proxy server. | ||
FROM debian:stable | ||
|
||
VOLUME ["/var/cache/apt-cacher-ng"] | ||
RUN apt-get update && apt-get install -y apt-cacher-ng | ||
|
||
EXPOSE 3142 | ||
CMD chown apt-cacher-ng:root /var/cache/apt-cacher-ng && /etc/init.d/apt-cacher-ng start && tail -f /var/log/apt-cacher-ng/* |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Acquire::http { Proxy "http://{{ system.apt_cacher }}:3142"; } |