mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-23 19:32:30 +01:00
c4ff0cf58c
Signed-off-by: Jess Frazelle <me@jessfraz.com>
41 lines
915 B
Docker
41 lines
915 B
Docker
# run a tor relay in a container
|
|
#
|
|
# Bridge relay:
|
|
# docker run -d \
|
|
# --restart always \
|
|
# -v /etc/localtime:/etc/localtime:ro \
|
|
# -p 9001:9001 \
|
|
# --name tor-relay \
|
|
# jess/tor-relay -f /etc/tor/torrc.bridge
|
|
#
|
|
# Exit relay:
|
|
# docker run -d \
|
|
# --restart always \
|
|
# -v /etc/localtime:/etc/localtime:ro \
|
|
# -p 9001:9001 \
|
|
# --name tor-relay \
|
|
# jess/tor-relay -f /etc/tor/torrc.exit
|
|
#
|
|
FROM alpine:latest
|
|
MAINTAINER Jessie Frazelle <jess@linux.com>
|
|
|
|
RUN apk --no-cache add \
|
|
--repository http://dl-3.alpinelinux.org/alpine/edge/community/ \
|
|
tor
|
|
|
|
# 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" ]
|