Public Repository

Last pushed: 2 years ago
Short Description
Ubuntu Container for Apt-Cacher-NG
Full Description

A caching proxy. Specialized for package files from Linux distributors, primarily for Debian (and Debian based) distributions but not limited to those. See documentation of Apt-Cacher to learn what it's good for.
How to use it?

  1. Pull this container on docker enabled machine using following command, $ docker pull rchincholkar/apt-cacher-ng
  1. You need one directory from docker host machine to store the cache, It will be mounted inside container. Use following command to start the container. $ docker run -d -v /apt-cache:/var/cache/apt-cacher-ng -p 2222:22 -p 3142:3142 rchincholkar/apt-cacher-ng:latest /usr/bin/supervisord

Using this command you will get your apt-cacher container running with port 3142. Just make sure, you created and have enough space for /apt-cache directory on your docker host machine to store cache.

I have configured the ssh so you can troubleshoot in case of any issues (remove '-p 2222:22' if dont want to use ssh).

How to configure clients to use apt-caher-ng?

  • For ubuntu, Create a file "/etc/apt/apt.conf.d/02proxy" and add following line without quotes
    "Acquire::http { Proxy "http://<IPADDRESS-OF-DOCKER-HOST>:3142"; };"

  • For CentOS, Append the following proxy line without quotes to "/etc/yum.conf"
    "proxy=http://<IPADDRESS-OF-DOCKER-HOST>:3142"

Any queries comment here or reach me at rchincholkar@gmail.com

Thanks and Enjoy!

Docker Pull Command
Owner
rchincholkar

Comments (0)