2015-08-24 21:55:26 +02:00
|
|
|
# run a tor relay in a container
|
|
|
|
#
|
|
|
|
# Bridge relay:
|
|
|
|
# docker run -d \
|
|
|
|
# --restart always \
|
2015-09-12 00:08:20 +02:00
|
|
|
# -v /etc/localtime:/etc/localtime:ro \
|
2015-08-24 21:55:26 +02:00
|
|
|
# -p 9001:9001 \
|
|
|
|
# --name tor-relay \
|
|
|
|
# jess/tor-relay -f /etc/tor/torrc.bridge
|
|
|
|
#
|
|
|
|
# Exit relay:
|
|
|
|
# docker run -d \
|
|
|
|
# --restart always \
|
2015-09-12 00:08:20 +02:00
|
|
|
# -v /etc/localtime:/etc/localtime:ro \
|
2015-08-24 21:55:26 +02:00
|
|
|
# -p 9001:9001 \
|
|
|
|
# --name tor-relay \
|
|
|
|
# jess/tor-relay -f /etc/tor/torrc.exit
|
|
|
|
#
|
|
|
|
FROM alpine:latest
|
2016-09-20 00:25:05 +02:00
|
|
|
MAINTAINER Jessie Frazelle <jess@linux.com>
|
2015-08-24 21:55:26 +02:00
|
|
|
|
2016-06-06 05:40:20 +02:00
|
|
|
RUN apk --no-cache add \
|
2016-08-12 03:59:19 +02:00
|
|
|
--repository http://dl-3.alpinelinux.org/alpine/edge/community/ \
|
2016-06-06 05:40:20 +02:00
|
|
|
tor
|
2015-08-24 21:55:26 +02:00
|
|
|
|
|
|
|
# default port to used for incoming Tor connections
|
|
|
|
# can be changed by changing 'ORPort' in torrc
|
|
|
|
EXPOSE 9001
|
|
|
|
|
|
|
|
# copy in our torrc files
|
|
|
|
COPY torrc.bridge /etc/tor/torrc.bridge
|
|
|
|
COPY torrc.middle /etc/tor/torrc.middle
|
|
|
|
COPY torrc.exit /etc/tor/torrc.exit
|
|
|
|
|
|
|
|
# make sure files are owned by tor user
|
|
|
|
RUN chown -R tor /etc/tor
|
|
|
|
|
|
|
|
USER tor
|
|
|
|
|
|
|
|
ENTRYPOINT [ "tor" ]
|