Git Product home page Git Product logo

docker-squid's Introduction

Squid Docker container

Squid in a docker container. This container is based on Alpine to keep the image size as small as possible. Out of the box squid is configured to proxy/cache HTTP/S traffic. If you just need a simple proxy then no further configuration will be necessary; however, most real world situations will require modifications to the out of the box configuration.

Running the container

To run squid with the out of the box confiruation

docker run -d -p 3128:3128 scbunn/squid:latest

Custom squid configuraiton

docker run \
-p 3121:3128 \
-v /my/custom/squid.conf:/etc/squid/squid.conf:ro,Z \
-d scbunn/squid:latest

Caching to disk

The default configruation specifies no disk cache and thus is in-memory only. If you want to allow disk caching you must pass in a custom configuration file that specifies the cache. It is recommened you also pass in a volume for persistance.

docker run  \
-p 3128:3128 \
-v /my/custom/squid.conf:/etc/squid/squid.conf:ro,Z \
-v /data/cache:/var/cache/squid:Z \
-d scbunn/squid:latest

Logging

The default configruation currently logs inside the container to /var/log/squid/. The default configuration is setup to only log failed attempts. Successfull attempts are not logged with the default config. The following log files are configured by default: /var/log/access.log, /var/log/cache.log. The goal is to redirect the access and cache log to stdout and stderr Issue 5.

Default Configuration

The default configuration supports basic HTTP/S. There are no access controls in place to prevent unwanted hosts from using this proxy. Any host that is able to connect will be accepted. The default config will proxy any request to port 80 or port 443.

docker-squid's People

Contributors

baseboxorg avatar scbunn avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.