Polipo proxy in Docker based on Alpine Linux
4.0K
Pilipo is a small and fast caching web proxy (a web cache, an HTTP proxy, a proxy server). While Polipo was designed to be used by one person or a small group of people, there is nothing that prevents it from being used by a larger group.
Polipo is originally developed by Juliusz Chroboczek
Running a Polipo in Docker brings a lot of benefits, we can run
many services for separate persons of system services. Also, Docker
provide full isolation from a host for safe use.
Docker example:
$ docker run \
--rm \
--name polipo \
-p 38123:8123/tcp \
binlab/polipo
Docker-compose example:
version: '3.3'
services:
polipo:
image: binlab/polipo
container_name: polipo
hostname: polipo
restart: always
ports:
- 38123:8123/tcp
volumes:
- polipo-cache:/var/cache/polipo:rw
- polipo-www:/usr/share/polipo/www:ro
networks:
- polipo
volumes:
polipo-cache:
polipo-www:
networks:
polipo:
driver: bridge
And then checking a Polipo works:
$ curl --proxy http://192.168.1.12:38123 https://api.ipify.org/
* You should change 192.168.1.12 to your <host_ip>
Docker example:
$ docker run \
--rm \
--name polipo \
-p 38123:8123/tcp \
binlab/polipo \
'proxyName=MyProxy' \
'displayName=MyProxy' \
'proxyAddress=0.0.0.0' \
'proxyPort=8123' \
'allowedClients=192.168.1.0/24,192.168.5.100' \
'authCredentials=UserName:MySuperPasswordHere'
Docker-compose example:
version: '3.3'
services:
polipo:
image: binlab/polipo
container_name: polipo
hostname: polipo
restart: always
command: |
proxyName="MyProxy"
displayName="MyProxy"
proxyAddress="0.0.0.0"
proxyPort="8123"
allowedClients="192.168.1.0/24,192.168.5.100"
authCredentials="UserName:MySuperPasswordHere"
ports:
- 38123:8123/tcp
volumes:
- polipo-cache:/var/cache/polipo:rw
- polipo-www:/usr/share/polipo/www:ro
networks:
- polipo
volumes:
polipo-cache:
polipo-www:
networks:
polipo:
driver: bridge
And then checking a Polipo works:
$ curl --proxy http://UserName:[email protected]:38123 https://api.ipify.org/
* You should change 192.168.1.12 to your <host_ip>
Docker example:
$ docker run \
--rm \
--name polipo \
-p 38123:8123/tcp \
binlab/polipo \
'proxyName=MyProxy' \
'displayName=MyProxy' \
'proxyAddress=0.0.0.0' \
'proxyPort=8123' \
'allowedClients=192.168.1.0/24,192.168.5.100' \
'authCredentials=UserName:MySuperPasswordHere' \
'diskCacheRoot=' \
'localDocumentRoot='
Docker-compose example:
version: '3.3'
services:
polipo:
image: binlab/polipo
container_name: polipo
hostname: polipo
restart: always
command: |
proxyName="MyProxy"
displayName="MyProxy"
proxyAddress="0.0.0.0"
proxyPort="8123"
allowedClients="192.168.1.0/24,192.168.5.100"
authCredentials="UserName:MySuperPasswordHere"
diskCacheRoot=""
localDocumentRoot=""
ports:
- 38123:8123/tcp
networks:
- polipo
networks:
polipo:
driver: bridge
Content type
Image
Digest
Size
2.4 MB
Last updated
almost 8 years ago
docker pull binlab/polipo