zhonger/squid
Install and run an Squid instance with docker.
You can use LDAP authentication or like an open proxy
By default, if you don't set environment variable, Squid is on open proxy mode
docker run --name squid --hostname squid -p 3128:3128 -d diouxx/squid
docker run --name squid --hostname squid -e LDAP_ENABLE=true -e LDAP_HOST=yourldap.domain.com -e LDAP_PORT=389 -e LDAP_BindDN="cn=admin,dc=yourdomain,dc=com" -e LDAP_BindPass="********" -e LDAP_DN="ou=Users,dc=yourdomain,dc=com" -e LDAP_ATTRIBUT="uid=%s" -e PROXY_NAME="Proxy Display Name" -p 3128:3128 -d diouxx/squid
docker run --name squid --hostname squid -e LDAP_ENABLE=true -e LDAP_HOST=yourldap.domain.com -e LDAP_PORT=636 -e LDAP_BindDN="cn=admin,dc=yourdomain,dc=com" -e LDAP_BindPass="********" -e LDAP_DN="ou=Users,dc=yourdomain,dc=com" -e LDAP_ATTRIBUT="uid=%s" -e PROXY_NAME="Proxy Display Name" -p 3128:3128 -d diouxx/squid
You can deploy squid docker with docker-compose.
version: '3.2'
services:
squid:
image: zhonger/squid
container_name: squid
hostname: squid
ports:
- "3128:3128"
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
restart: always
version: '3.2'
services:
squid:
image: zhonger/squid
container_name: squid
hostname: squid
ports:
- "3128:3128"
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- LDAP_ENABLE=true
- LDAP_HOST=yourldap.domain.com
- LDAP_PORT=389
- LDAP_BindDN="cn=admin,dc=yourdomain,dc=com"
- LDAP_BindPass="********"
- LDAP_DN="ou=Users,dc=yourdomain,dc=com"
- LDAP_ATTRIBUT="uid=%s"
- PROXY_NAME="Proxy Display Name"
restart: always
version: '3.2'
services:
squid:
image: zhonger/squid
container_name: squid
hostname: squid
ports:
- "3128:3128"
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- LDAP_ENABLE=true
- LDAP_HOST=yourldap.domain.com
- LDAP_PORT=636
- LDAP_BindDN="cn=admin,dc=yourdomain,dc=com"
- LDAP_BindPass="********"
- LDAP_DN="ou=Users,dc=yourdomain,dc=com"
- LDAP_ATTRIBUT="uid=%s"
- PROXY_NAME="Proxy Display Name"
restart: always
To deploy, just run the following command on the same directory as file
docker-compose up -d
It use to enable LDAP Authentication. By default, it is set to false To enable, just set to true
LDAP_ENABLE=true
Only use if LDAP_ENABLE is set to true
Specifies the LDAP host to contact for authentication. In the form of DNS names or IP addresses
LDAP_HOST=yourldap.domain.com
Only use if LDAP_ENABLE is set to true
Specifies the LDAP server port. By convention :
LDAP_PORT=636
Only use if LDAP_ENABLE is set to true
Specifies the LDAP administrator username.
LDAP_BindDN="cn=admin,dc=yourdomain,dc=com"
Only use if LDAP_ENABLE is set to true
Specifies the LDAP administrator password.
LDAP_BindPass="********"
Only use if LDAP_ENABLE is set to true
Specifies Distinguish Name where user is registered
LDAP_DN="ou=Users,dc=yourdomain,dc=com"
Only use if LDAP_ENABLE is set to true
Specifies LDAP attribut for users authentication
LDAP_ATTRIBUT="uid=%s"
Only use if LDAP_ENABLE is set to true
Set Display Name for your proxy
PROXY_NAME="Your Proxy Display Name"
docker pull zhonger/squid