1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-16 11:58:47 +00:00

update polipo

This commit is contained in:
kev 2016-08-30 11:42:12 +08:00
parent 62be70c241
commit e321d0e45a
3 changed files with 15 additions and 9 deletions

@ -5,7 +5,8 @@
FROM alpine FROM alpine
MAINTAINER kev <noreply@easypi.info> MAINTAINER kev <noreply@easypi.info>
RUN apk add -U build-base openssl \ RUN set -xe \
&& apk add --no-cache build-base openssl \
&& wget https://github.com/jech/polipo/archive/master.zip -O polipo.zip \ && wget https://github.com/jech/polipo/archive/master.zip -O polipo.zip \
&& unzip polipo.zip \ && unzip polipo.zip \
&& cd polipo-master \ && cd polipo-master \
@ -14,8 +15,7 @@ RUN apk add -U build-base openssl \
&& cd .. \ && cd .. \
&& rm -rf polipo.zip polipo-master \ && rm -rf polipo.zip polipo-master \
&& mkdir -p /usr/share/polipo/www /var/cache/polipo \ && mkdir -p /usr/share/polipo/www /var/cache/polipo \
&& apk del build-base openssl \ && apk del build-base openssl
&& rm -rf /var/cache/apk/*
EXPOSE 8123 EXPOSE 8123

@ -1,17 +1,19 @@
Polipo — a caching web proxy Polipo — a caching web proxy
============================ ============================
`Polipo` is a small and fast caching web proxy (a web cache, an HTTP proxy, a [Polipo][1] 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 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 of people, there is nothing that prevents it from being used by a larger
group. group.
## docker-compose.yml ## docker-compose.yml
``` ```yaml
polipo: polipo:
image: vimagick/polipo image: vimagick/polipo
command: authCredentials=username:password command:
authCredentials=username:password
socksParentProxy=1.2.3.4:9050
ports: ports:
- "8123:8123" - "8123:8123"
restart: always restart: always
@ -19,12 +21,14 @@ polipo:
## server ## server
``` ```bash
$ docker-compose up -d $ docker-compose up -d
``` ```
## client ## client
``` ```bash
$ curl -x http://username:password@server:8123 https://www.youtube.com/ $ curl -x http://username:password@server:8123 https://www.youtube.com/
``` ```
[1]: https://www.irif.univ-paris-diderot.fr/~jch/software/polipo/

@ -1,6 +1,8 @@
polipo: polipo:
image: vimagick/polipo image: vimagick/polipo
command: authCredentials=username:password command:
authCredentials=username:password
socksParentProxy=1.2.3.4:9050
ports: ports:
- "8123:8123" - "8123:8123"
restart: always restart: always