1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-25 02:04:06 +02:00
This commit is contained in:
kev 2015-06-18 18:10:26 +08:00
parent aa3a9c5262
commit f8c2a44e8c
2 changed files with 41 additions and 0 deletions

32
tor/Dockerfile Normal file
View File

@ -0,0 +1,32 @@
#
# Dockerfile for tor
#
FROM alpine
MAINTAINER kev <noreply@datageek.info>
ENV TOR_VER 0.2.6.9
ENV TOR_URL https://www.torproject.org/dist/tor-$TOR_VER.tar.gz
ENV TOR_MD5 4a1b334c30d7b37ea72fa33425220d5d
ENV TOR_FILE tor.tar.gz
ENV TOR_TEMP tor
ENV TOR_DEPS build-base libevent-dev openssl-dev
RUN apk add -U $TOR_DEPS \
&& wget -O $TOR_FILE $TOR_URL \
&& echo "$TOR_MD5 $TOR_FILE" | md5sum -c \
&& mkdir $TOR_TEMP \
& tar xzf $TOR_FILE --strip 1 -C $TOR_TEMP \
&& cd $TOR_TEMP \
&& ./configure --prefix=/ --exec-prefix=/usr \
&& make install \
&& cd .. \
&& rm -rf $TOR_FILE $TOR_TEMP \
&& apk del $TOR_DEPS \
&& rm -rf /var/cache/apk/*
COPY ./torrc /etc/tor/torrc
VOLUME /etc/tor
EXPOSE 9001 9030 9050 9051
CMD ["/usr/bin/tor", "-f", "/etc/tor/torrc"]

9
tor/torrc Normal file
View File

@ -0,0 +1,9 @@
RunAsDaemon 0
SocksPort 0
ORPort 9001
BridgeRelay 1
#ServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy
ExtORPort auto
Exitpolicy reject *:*
ContactInfo noreply@datageek.info
Nickname datageek