Public Repository

Last pushed: 2 years ago
Short Description
Squid proxy configurable container.
Full Description



Dockerfile to create a Docker container image for Squid proxy server.

Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Squid has extensive access controls and makes a great server accelerator.

$This container is based off Sameer Naik's existing squid container. Big thanks to him for his many great docker containers.


If you find this image useful here's how you can help:

  • Send a pull request with your awesome features and bug fixes
  • Help users resolve their issues.


Before reporting your issue please try to ensure everything is sensible as per the docker docs, and you probably want to make sure your docker version is fairly current.

SELinux users should be aware it could interfere with the container, please refer to its logs to troubleshoot.

If the above recommendations do not help then report your issue along with the following information:

  • Output of the docker version and docker info commands
  • The docker run command or docker-compose.yml used to start the image. Mask out the sensitive bits.
  • Please state if you are using Boot2Docker, Docker-Machine, VirtualBox, etc.

Getting started


If you need to make additional changes to the stock squid.conf file, you may do sp by tweaking squid.conf to your preference and then volume mounting it to /etc/squid/squid.conf. Please note that the stock configuration available with the container is set for local access, you may need to tweak it if your network scenario is different.


docker run --name squid -d -p 3128:3128 Datadog/squid


If you wish to persist the cache, mount a volume to /var/spool/squid (make sure the right AppArmor or SELinux permissions are set at the mountpoint):

docker run --name squid -d -p 3128:3128 --volume /home/foo/squid/cache:/var/spool/squid Datadog/squid


If you wish to have log persistance, mount a volume to /var/log/squid (again make sure the right AppArmor or SELinux permissions are set at the mountpoint):

docker run --name squid -d -p 3128:3128 --volume /home/foo/squid/logs:/var/log/squid Datadog/squid


Once the container has been successfully deployed (assuming you have published port 3128) you should be able to run your traffic through the proxy by using localhost:3128 (on linux), or alternatively the address for your docker machine <docker-machine-ip>:3128 ( in the examples).

You may configure your browser to use that address:port, or at the shell:

export ftp_proxy=
export http_proxy=
export https_proxy=
Docker Pull Command