Sign inSign up

pikamonvvs/squid-alpine

By pikamonvvs

Updated over 2 years ago

A Squid proxy server based on Alpine Linux

Image
Networking
Web servers
0

93

pikamonvvs/squid-alpine repository overview

🟢 A Squid Proxy on Alpine Linux 🟢

1. Description

This is a Squid Proxy server based on Alpine Linux.

The versions are as follows: Alpine Linux and Squid.

Alpine Linux: 3.19.0
Squid: 6.6
The size of the image: 20.7MB

2. How to use (Usage)

You can use it by following the steps below.

1. Download the image

Pull the image.

docker pull pikamonvvs/squid-alpine:1.0
2. Run a container

The server operates on port 3128, so you need to open it.

docker run -d --name [container_name] -p 3128:3128 pikamonvvs/squid-alpine:1.0

When you start the container, it automatically launches a proxy server.

3. Register an account

The server is configured so that only users registered in /etc/squid/passwd can connect to it.

You can register an account by creating an htpasswd file and passing it to the container.

apt update
apt install -y apache2-utils
htpasswd -c mypasswd [account_name]
docker cp mypasswd [container_name]:/etc/squid/passwd

And you can access the server with your registered account.

Enjoy using it!


Appendix A.

I created this image using the Dockerfile and squid.conf provided below.

  • Dockerfile
FROM alpine:latest

RUN apk update && \
	apk --no-cache add squid

COPY squid.conf /etc/squid/squid.conf

EXPOSE 3128

CMD ["squid", "-N"]
  • squid.conf
# Squid configuration file

# Set visible_hostname
visible_hostname squid

# Listen on port 3128
http_port 3128

# Password file
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwd
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
acl auth_users proxy_auth REQUIRED
http_access allow auth_users

  • on shell
docker build -t pikamonvvs/squid-alpine:1.0 .

Tag summary

Content type

Image

Digest

sha256:77a6328a1

Size

9.7 MB

Last updated

over 2 years ago

docker pull pikamonvvs/squid-alpine:1.0