A Squid proxy server based on Alpine Linux
93
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
You can use it by following the steps below.
Pull the image.
docker pull pikamonvvs/squid-alpine:1.0
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.
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!
I created this image using the Dockerfile and squid.conf provided below.
FROM alpine:latest
RUN apk update && \
apk --no-cache add squid
COPY squid.conf /etc/squid/squid.conf
EXPOSE 3128
CMD ["squid", "-N"]
# 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
docker build -t pikamonvvs/squid-alpine:1.0 .
Content type
Image
Digest
sha256:77a6328a1…
Size
9.7 MB
Last updated
over 2 years ago
docker pull pikamonvvs/squid-alpine:1.0