Sign inSign up

jonathanfoster/squid

By jonathanfoster

•Updated over 8 years ago

Alpine container with Squid configured for basic authentication and domain block lists.

Image
1

181

jonathanfoster/squid repository overview

⁠Squid

Alpine container with Squid configured for basic authentication and domain block lists.

⁠Usage

Start the container.

docker run --name squid -d -p 3128:3128 --restart always jonathanfoster/squid

⁠Authenication

Squid is configured to use basic authentication. Local traffic does not require authentication. Create users using htpasswd.

docker exec -it squid htpasswd -c /etc/squid/passwd $USERNAME

⁠Domain Block List

The domain block list is stored in /etc/squid/blocklist. You can block a specific subdomain (e.g. www.reddit.com) or all subdomains (e.g. .reddit.com). Each blocked domain must be listed on a separate line. If the block list changes, you have to force Squid to reload the list by sending a SIGHUP signal.

docker exec squid mkdir /etc/squid/blocklist/
docker exec squid sh -c "echo '.reddit.com' > /etc/squid/blocklist"
docker kill -s HUP squid

⁠Shell Access

For debugging and maintenance purposes, you may want to access the container's shell.

docker exec -it squid sh

⁠More Information

Tag summary

Content type

Image

Digest

Size

5.8 MB

Last updated

over 8 years ago

docker pull jonathanfoster/squid