{"id":14978994,"url":"https://github.com/sameersbn/docker-squid","last_synced_at":"2025-05-16T09:03:40.358Z","repository":{"id":21289550,"uuid":"24605580","full_name":"sameersbn/docker-squid","owner":"sameersbn","description":"Dockerfile to create a Docker container image for Squid proxy server","archived":false,"fork":false,"pushed_at":"2024-02-06T09:29:50.000Z","size":155,"stargazers_count":840,"open_issues_count":53,"forks_count":418,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-05-15T12:58:46.223Z","etag":null,"topics":["caching-proxy","containers","docker","docker-image","proxy","squid"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sameersbn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-09-29T17:38:39.000Z","updated_at":"2025-04-18T05:55:27.000Z","dependencies_parsed_at":"2023-02-10T19:30:23.051Z","dependency_job_id":"668d9b16-d47b-4261-8758-b410b2c2aff7","html_url":"https://github.com/sameersbn/docker-squid","commit_stats":{"total_commits":139,"total_committers":4,"mean_commits":34.75,"dds":"0.021582733812949617","last_synced_commit":"924b0855440442a4be330ef4dba7a85681e9a49d"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameersbn%2Fdocker-squid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameersbn%2Fdocker-squid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameersbn%2Fdocker-squid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameersbn%2Fdocker-squid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sameersbn","download_url":"https://codeload.github.com/sameersbn/docker-squid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254501554,"owners_count":22081528,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["caching-proxy","containers","docker","docker-image","proxy","squid"],"created_at":"2024-09-24T13:58:52.687Z","updated_at":"2025-05-16T09:03:40.339Z","avatar_url":"https://github.com/sameersbn.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Circle CI](https://circleci.com/gh/sameersbn/docker-squid.svg?style=shield)](https://circleci.com/gh/sameersbn/docker-squid) [![Docker Repository on Quay.io](https://quay.io/repository/sameersbn/squid/status \"Docker Repository on Quay.io\")](https://quay.io/repository/sameersbn/squid)\n\n# sameersbn/squid:3.5.27-2\n\n- [Introduction](#introduction)\n  - [Contributing](#contributing)\n  - [Issues](#issues)\n- [Getting started](#getting-started)\n  - [Installation](#installation)\n  - [Quickstart](#quickstart)\n  - [Command-line arguments](#command-line-arguments)\n  - [Persistence](#persistence)\n  - [Configuration](#configuration)\n  - [Usage](#usage)\n  - [Logs](#logs)\n- [Maintenance](#maintenance)\n  - [Upgrading](#upgrading)\n  - [Shell Access](#shell-access)\n\n# Introduction\n\n`Dockerfile` to create a [Docker](https://www.docker.com/) container image for [Squid proxy server](http://www.squid-cache.org/).\n\nSquid 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.\n\n## Contributing\n\nIf you find this image useful here's how you can help:\n\n- Send a pull request with your awesome features and bug fixes\n- Help users resolve their [issues](../../issues?q=is%3Aopen+is%3Aissue).\n- Support the development of this image with a [donation](http://www.damagehead.com/donate/)\n\n## Issues\n\nBefore reporting your issue please try updating Docker to the latest version and check if it resolves the issue. Refer to the Docker [installation guide](https://docs.docker.com/installation) for instructions.\n\nSELinux users should try disabling SELinux using the command `setenforce 0` to see if it resolves the issue.\n\nIf the above recommendations do not help then [report your issue](../../issues/new) along with the following information:\n\n- Output of the `docker version` and `docker info` commands\n- The `docker run` command or `docker-compose.yml` used to start the image. Mask out the sensitive bits.\n- Please state if you are using [Boot2Docker](http://www.boot2docker.io), [VirtualBox](https://www.virtualbox.org), etc.\n\n# Getting started\n\n## Installation\n\nAutomated builds of the image are available on [Dockerhub](https://hub.docker.com/r/sameersbn/squid) and is the recommended method of installation.\n\n\u003e **Note**: Builds are also available on [Quay.io](https://quay.io/repository/sameersbn/squid)\n\n```bash\ndocker pull sameersbn/squid:3.5.27-2\n```\n\nAlternatively you can build the image yourself.\n\n```bash\ndocker build -t sameersbn/squid github.com/sameersbn/docker-squid\n```\n\n## Quickstart\n\nStart Squid using:\n\n```bash\ndocker run --name squid -d --restart=always \\\n  --publish 3128:3128 \\\n  --volume /srv/docker/squid/cache:/var/spool/squid \\\n  sameersbn/squid:3.5.27-2\n```\n\n*Alternatively, you can use the sample [docker-compose.yml](docker-compose.yml) file to start the container using [Docker Compose](https://docs.docker.com/compose/)*\n\n## Command-line arguments\n\nYou 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:\n\n```bash\ndocker run --name squid -it --rm \\\n  --publish 3128:3128 \\\n  --volume /srv/docker/squid/cache:/var/spool/squid \\\n  sameersbn/squid:3.5.27-2 -h\n```\n\n## Persistence\n\nFor the cache to preserve its state across container shutdown and startup you should mount a volume at `/var/spool/squid`.\n\n\u003e *The [Quickstart](#quickstart) command already mounts a volume for persistence.*\n\nSELinux users should update the security context of the host mountpoint so that it plays nicely with Docker:\n\n```bash\nmkdir -p /srv/docker/squid\nchcon -Rt svirt_sandbox_file_t /srv/docker/squid\n```\n\n## Configuration\n\nSquid 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`.\n\n```bash\ndocker run --name squid -d --restart=always \\\n  --publish 3128:3128 \\\n  --volume /path/to/squid.conf:/etc/squid/squid.conf \\\n  --volume /srv/docker/squid/cache:/var/spool/squid \\\n  sameersbn/squid:3.5.27-2\n```\n\nTo reload the Squid configuration on a running instance you can send the `HUP` signal to the container.\n\n```bash\ndocker kill -s HUP squid\n```\n\n## Usage\n\nConfigure your web browser network/connection settings to use the proxy server which is available at `172.17.0.1:3128`\n\nIf 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.\n\n```bash\nexport ftp_proxy=http://172.17.0.1:3128\nexport http_proxy=http://172.17.0.1:3128\nexport https_proxy=http://172.17.0.1:3128\n```\n\nTo use Squid in your Docker containers add the following line to your `Dockerfile`.\n\n```dockerfile\nENV http_proxy=http://172.17.0.1:3128 \\\n    https_proxy=http://172.17.0.1:3128 \\\n    ftp_proxy=http://172.17.0.1:3128\n```\n\n## Logs\n\nTo access the Squid logs, located at `/var/log/squid/`, you can use `docker exec`. For example, if you want to tail the access logs:\n\n```bash\ndocker exec -it squid tail -f /var/log/squid/access.log\n```\n\nYou can also mount a volume at `/var/log/squid/` so that the logs are directly accessible on the host.\n\n# Maintenance\n\n## Upgrading\n\nTo upgrade to newer releases:\n\n  1. Download the updated Docker image:\n\n  ```bash\n  docker pull sameersbn/squid:3.5.27-2\n  ```\n\n  2. Stop the currently running image:\n\n  ```bash\n  docker stop squid\n  ```\n\n  3. Remove the stopped container\n\n  ```bash\n  docker rm -v squid\n  ```\n\n  4. Start the updated image\n\n  ```bash\n  docker run -name squid -d \\\n    [OPTIONS] \\\n    sameersbn/squid:3.5.27-2\n  ```\n\n## Shell Access\n\nFor 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`:\n\n```bash\ndocker exec -it squid bash\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameersbn%2Fdocker-squid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsameersbn%2Fdocker-squid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameersbn%2Fdocker-squid/lists"}