1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-01-18 04:59:16 +02:00
dockerfiles/privoxy/Dockerfile

23 lines
614 B
Docker
Raw Normal View History

2015-06-29 00:58:36 +08:00
#
# Dockerfile for privoxy
#
FROM alpine
MAINTAINER kev <noreply@datageek.info>
2015-06-29 01:18:53 +08:00
ADD https://github.com/tianon/gosu/releases/download/1.4/gosu-amd64 /usr/sbin/gosu
RUN apk add -U iptables privoxy \
&& chmod +x /usr/sbin/gosu \
2015-06-29 00:58:36 +08:00
&& rm -rf /var/cache/apk/*
2015-06-29 01:18:53 +08:00
RUN sed -i -e '/^listen-address/s/127.0.0.1/0.0.0.0/' \
-e '/^accept-intercepted-requests/s/0/1/' \
/etc/privoxy/config
2015-06-29 00:58:36 +08:00
VOLUME /etc/privoxy
EXPOSE 8118
2015-06-29 01:18:53 +08:00
CMD iptables -t nat -A OUTPUT -p tcp --dport 80 ! -m owner --uid-owner privoxy -j REDIRECT --to-ports 8118 \
&& gosu privoxy privoxy --no-daemon /etc/privoxy/config