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
|
|
|
|
#
|
2017-06-20 15:46:19 +02:00
|
|
|
FROM alpine:latest
|
2017-03-09 19:14:37 +01:00
|
|
|
LABEL 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 \
|
|
|
|
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
|
|
|
|
|
2017-06-20 15:46:19 +02:00
|
|
|
RUN mkdir /var/lib/tor/.tor
|
|
|
|
VOLUME /var/lib/tor/.tor
|
|
|
|
RUN chown -R tor /var/lib/tor/.tor
|
|
|
|
|
2015-08-24 21:55:26 +02:00
|
|
|
ENTRYPOINT [ "tor" ]
|