2015-06-18 12:10:26 +02:00
|
|
|
#
|
|
|
|
# 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
|
2015-06-18 12:15:30 +02:00
|
|
|
ENV TOR_TEMP tor-$TOR_VER
|
2015-06-18 12:10:26 +02:00
|
|
|
|
2015-06-18 13:49:42 +02:00
|
|
|
RUN apk add -U build-base \
|
|
|
|
gmp-dev \
|
|
|
|
libevent \
|
|
|
|
libevent-dev \
|
|
|
|
libgmpxx \
|
|
|
|
openssl \
|
|
|
|
openssl-dev \
|
|
|
|
python \
|
|
|
|
python-dev \
|
2015-06-18 12:10:26 +02:00
|
|
|
&& wget -O $TOR_FILE $TOR_URL \
|
2015-06-18 13:49:42 +02:00
|
|
|
&& echo "$TOR_MD5 $TOR_FILE" | md5sum -c \
|
|
|
|
&& tar xzf $TOR_FILE \
|
2015-06-18 12:10:26 +02:00
|
|
|
&& cd $TOR_TEMP \
|
|
|
|
&& ./configure --prefix=/ --exec-prefix=/usr \
|
|
|
|
&& make install \
|
|
|
|
&& cd .. \
|
|
|
|
&& rm -rf $TOR_FILE $TOR_TEMP \
|
2015-06-18 13:49:42 +02:00
|
|
|
&& wget -O- https://bootstrap.pypa.io/get-pip.py | python \
|
2015-06-18 13:54:13 +02:00
|
|
|
&& pip install fteproxy \
|
|
|
|
obfsproxy \
|
2015-06-18 13:49:42 +02:00
|
|
|
&& apk del build-base \
|
|
|
|
gmp-dev \
|
|
|
|
libevent-dev \
|
|
|
|
openssl-dev \
|
|
|
|
python-dev \
|
2015-06-18 12:10:26 +02:00
|
|
|
&& rm -rf /var/cache/apk/*
|
|
|
|
|
|
|
|
COPY ./torrc /etc/tor/torrc
|
2015-06-18 14:33:27 +02:00
|
|
|
VOLUME /etc/tor /root/.tor
|
2015-06-18 12:10:26 +02:00
|
|
|
EXPOSE 9001 9030 9050 9051
|
|
|
|
|
|
|
|
CMD ["/usr/bin/tor", "-f", "/etc/tor/torrc"]
|