All Projects → sameersbn → Docker Squid

sameersbn / Docker Squid

Licence: mit
Dockerfile to create a Docker container image for Squid proxy server

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Docker Squid

Box
A mruby-based Builder for Docker Images
Stars: ✭ 236 (-64.72%)
Mutual labels:  containers, docker-image
Bhadoo Cloud
Directly Upload to Google Drive from Torrent or URLs
Stars: ✭ 136 (-79.67%)
Mutual labels:  proxy, docker-image
Bitnami Docker Mariadb
Bitnami MariaDB Docker Image
Stars: ✭ 251 (-62.48%)
Mutual labels:  containers, docker-image
Bitnami Docker Moodle
Bitnami Docker Image for Moodle
Stars: ✭ 188 (-71.9%)
Mutual labels:  containers, docker-image
Umoci
umoci modifies Open Container images
Stars: ✭ 349 (-47.83%)
Mutual labels:  containers, docker-image
Bitnami Docker Nginx
Bitnami nginx Docker Image
Stars: ✭ 198 (-70.4%)
Mutual labels:  containers, docker-image
Graphqldockerproxy
A generic Graphql API for Docker and Kubernetes
Stars: ✭ 38 (-94.32%)
Mutual labels:  proxy, docker-image
Bitnami Docker Rabbitmq
Bitnami Docker Image for RabbitMQ
Stars: ✭ 120 (-82.06%)
Mutual labels:  containers, docker-image
Bitnami Docker Redis
Bitnami Redis Docker Image
Stars: ✭ 317 (-52.62%)
Mutual labels:  containers, docker-image
Stargz Snapshotter
Fast docker image distribution plugin for containerd, based on CRFS/stargz
Stars: ✭ 263 (-60.69%)
Mutual labels:  containers, docker-image
Bitnami Docker Redmine
Bitnami Docker Image for Redmine
Stars: ✭ 172 (-74.29%)
Mutual labels:  containers, docker-image
Picluster
A Simplified Docker Swarm or Kubernetes Alternative to Container Scheduling and Orchestration
Stars: ✭ 390 (-41.7%)
Mutual labels:  containers, docker-image
Bitnami Docker Magento
Bitnami Docker Image for Magento
Stars: ✭ 159 (-76.23%)
Mutual labels:  containers, docker-image
Bitnami Docker Php Fpm
Bitnami PHP-FPM Docker Image
Stars: ✭ 210 (-68.61%)
Mutual labels:  containers, docker-image
Kubler
A generic, extendable build orchestrator.
Stars: ✭ 126 (-81.17%)
Mutual labels:  containers, docker-image
Docker Dante Telegram
dante config builder for Telegram SOCKS-proxy & Dockerfile for building image with such proxy
Stars: ✭ 16 (-97.61%)
Mutual labels:  proxy, docker-image
Bitnami Docker Node
Bitnami Node.js Docker Image
Stars: ✭ 111 (-83.41%)
Mutual labels:  containers, docker-image
Bitnami Docker Mysql
Bitnami MySQL Docker Image
Stars: ✭ 116 (-82.66%)
Mutual labels:  containers, docker-image
Psiphon
A multi-functional version of a popular network circumvention tool
Stars: ✭ 169 (-74.74%)
Mutual labels:  proxy, docker-image
Please Contain Yourself
A Docker tutorial written for people who don't actually know Docker already.
Stars: ✭ 385 (-42.45%)
Mutual labels:  containers, docker-image

Circle CI Docker Repository on Quay.io

sameersbn/squid:3.5.27-2

Introduction

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.

Contributing

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.
  • Support the development of this image with a donation

Issues

Before reporting your issue please try updating Docker to the latest version and check if it resolves the issue. Refer to the Docker installation guide for instructions.

SELinux users should try disabling SELinux using the command setenforce 0 to see if it resolves the issue.

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, VirtualBox, etc.

Getting started

Installation

Automated builds of the image are available on Dockerhub and is the recommended method of installation.

Note: Builds are also available on Quay.io

docker pull sameersbn/squid:3.5.27-2

Alternatively you can build the image yourself.

docker build -t sameersbn/squid github.com/sameersbn/docker-squid

Quickstart

Start Squid using:

docker run --name squid -d --restart=always \
  --publish 3128:3128 \
  --volume /srv/docker/squid/cache:/var/spool/squid \
  sameersbn/squid:3.5.27-2

Alternatively, you can use the sample docker-compose.yml file to start the container using Docker Compose

Command-line arguments

You can customize the launch command of the Squid server by specifying arguments to squid on the docker run command. For example the following command prints the help menu of squid command:

docker run --name squid -it --rm \
  --publish 3128:3128 \
  --volume /srv/docker/squid/cache:/var/spool/squid \
  sameersbn/squid:3.5.27-2 -h

Persistence

For the cache to preserve its state across container shutdown and startup you should mount a volume at /var/spool/squid.

The Quickstart command already mounts a volume for persistence.

SELinux users should update the security context of the host mountpoint so that it plays nicely with Docker:

mkdir -p /srv/docker/squid
chcon -Rt svirt_sandbox_file_t /srv/docker/squid

Configuration

Squid is a full featured caching proxy server and a large number of configuration parameters. To configure Squid as per your requirements mount your custom configuration at /etc/squid/squid.conf.

docker run --name squid -d --restart=always \
  --publish 3128:3128 \
  --volume /path/to/squid.conf:/etc/squid/squid.conf \
  --volume /srv/docker/squid/cache:/var/spool/squid \
  sameersbn/squid:3.5.27-2

To reload the Squid configuration on a running instance you can send the HUP signal to the container.

docker kill -s HUP squid

Usage

Configure your web browser network/connection settings to use the proxy server which is available at 172.17.0.1:3128

If you are using Linux then you can also add the following lines to your .bashrc file allowing command line applications to use the proxy server for outgoing connections.

export ftp_proxy=http://172.17.0.1:3128
export http_proxy=http://172.17.0.1:3128
export https_proxy=http://172.17.0.1:3128

To use Squid in your Docker containers add the following line to your Dockerfile.

ENV http_proxy=http://172.17.0.1:3128 \
    https_proxy=http://172.17.0.1:3128 \
    ftp_proxy=http://172.17.0.1:3128

Logs

To access the Squid logs, located at /var/log/squid/, you can use docker exec. For example, if you want to tail the access logs:

docker exec -it squid tail -f /var/log/squid/access.log

You can also mount a volume at /var/log/squid/ so that the logs are directly accessible on the host.

Maintenance

Upgrading

To upgrade to newer releases:

  1. Download the updated Docker image:
docker pull sameersbn/squid:3.5.27-2
  1. Stop the currently running image:
docker stop squid
  1. Remove the stopped container
docker rm -v squid
  1. Start the updated image
docker run -name squid -d \
  [OPTIONS] \
  sameersbn/squid:3.5.27-2

Shell Access

For debugging and maintenance purposes you may want access the containers shell. If you are using Docker version 1.3.0 or higher you can access a running containers shell by starting bash using docker exec:

docker exec -it squid bash
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].