Last active
December 27, 2015 10:09
-
-
Save fairchild/7309068 to your computer and use it in GitHub Desktop.
dockerfile defining a basic apt-cacher-ng service
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
# Apt-Proxy hosting image | |
# | |
# VERSION 0.1.0 | |
# Use a modified version of the Ubuntu base image provided by dotCloud | |
FROM fairchild/ubuntu | |
MAINTAINER Michael Fairchild [email protected] | |
ENV APT_PROXY apt.dockerdev.att.io | |
RUN apt-get update && apt-get install -y apt-cacher-ng | |
RUN echo "Acquire::http { Proxy \"http://127.0.0.1:3142\"; };"| tee -a /etc/apt/apt.conf.d/01proxy | |
ENTRYPOINT ["/usr/sbin/apt-cacher-ng", "ForeGround=1"] | |
EXPOSE 3142 |
updated, and it now works
docker build fairchild/ubuntu:apt .
sudo docker run -d -p 3142 -v /vagrant/fairchild/volumes/apt-cache/:/var/cache fairchild/ubuntu:apt
The -v is just so that the cache can be reused across different containers and container restarts
vagrant at precise64 in /vagrant/fairchild on master*
$ sudo docker run -i -t --link gray_sheep0:apt fairchild/ubuntu /bin/bash
root@4fbbd6275ba0:/# env
APT_PORT_3142_TCP=tcp://172.17.0.115:3142
HOSTNAME=4fbbd6275ba0
TERM=xterm
APT_PORT_3142_TCP_PORT=3142
APT_PORT_3142_TCP_PROTO=tcp
APT_PORT_3142_TCP_ADDR=172.17.0.115
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/
SHLVL=1
HOME=/
APT_PORT=tcp://172.17.0.115:3142
DEBIAN_FRONTEND=dialog
APT_NAME=/gold_dog5/apt
container=lxc
_=/usr/bin/env
root@4fbbd6275ba0:/#
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
its not currently launching the apt-cacher-ng process,