Dockerfile
to run squid inside a docker container.
The squid daemon will run as the proxy user. The uid/gid is mapped
50013.
$ git clone https://github.com/stafwag/docker-stafwag-squid.git
$ cd docker-stafwag-squid
$ vi etc/squid.conf
$ docker build -t stafwag/squid .
$ sudo mkdir -p /home/volumes/docker/squid/cache
$ sudo chown 50013:50013 /home/volumes/docker/squid/cache
Execute the run shell script.
$ ./run.sh
Or run the docker command:
CACHEDIR_VOLUME=/home/volumes/docker/squid/cache
docker run -d --name myproxy --rm -v $CACHEDIR_VOLUME:/var/spool/squid -p 3128:3128 stafwag/squid
Have fun