mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-23 11:31:49 +01:00
33 lines
757 B
Docker
33 lines
757 B
Docker
|
# run a tor socks proxy in a container
|
||
|
#
|
||
|
# Exit relay:
|
||
|
# docker run -d \
|
||
|
# --restart always \
|
||
|
# -v /etc/localtime:/etc/localtime:ro \
|
||
|
# -p 9050:9050 \
|
||
|
# --name torproxy \
|
||
|
# jess/tor-proxy
|
||
|
#
|
||
|
FROM alpine:latest
|
||
|
MAINTAINER Jessica Frazelle <jess@docker.com>
|
||
|
|
||
|
# Note: Tor is only in testing repo -> http://pkgs.alpinelinux.org/packages?package=emacs&repo=all&arch=x86_64
|
||
|
RUN apk update && apk add \
|
||
|
tor \
|
||
|
--update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \
|
||
|
&& rm -rf /var/cache/apk/*
|
||
|
|
||
|
# expose socks port
|
||
|
EXPOSE 9050
|
||
|
|
||
|
# copy in our torrc file
|
||
|
COPY torrc.default /etc/tor/torrc.default
|
||
|
|
||
|
# make sure files are owned by tor user
|
||
|
RUN chown -R tor /etc/tor
|
||
|
|
||
|
USER tor
|
||
|
|
||
|
ENTRYPOINT [ "tor" ]
|
||
|
CMD [ "-f", "/etc/tor/torrc.default" ]
|