1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-01-26 05:27:31 +02:00
dockerfiles/tor/Dockerfile

42 lines
1.2 KiB
Docker
Raw Normal View History

2015-06-18 18:10:26 +08:00
#
# Dockerfile for tor
#
2015-10-27 11:10:47 +08:00
FROM alpine
2015-06-18 18:10:26 +08:00
MAINTAINER kev <noreply@datageek.info>
2015-10-27 11:10:47 +08:00
RUN echo 'http://dl-4.alpinelinux.org/alpine/edge/main' >> /etc/apk/repositories \
2015-10-27 11:07:28 +08:00
&& echo 'http://dl-4.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories \
2015-09-28 13:30:31 +08:00
&& apk add -U build-base \
2015-09-28 15:33:24 +08:00
git \
2015-09-28 15:41:16 +08:00
gmp-dev \
2015-09-28 15:33:24 +08:00
go \
2015-09-28 13:30:31 +08:00
libgmpxx \
py-pip \
python \
python-dev \
tor \
&& pip install fteproxy \
obfsproxy \
2015-09-28 15:33:24 +08:00
&& GOPATH=/tmp/obfs4 go get git.torproject.org/pluggable-transports/obfs4.git/obfs4proxy \
&& mv /tmp/obfs4/bin/obfs4proxy /usr/bin \
&& rm -rf /tmp/obfs4 \
2015-10-27 10:51:45 +08:00
&& GOPATH=/tmp/meek go get git.torproject.org/pluggable-transports/meek.git/meek-server \
&& mv /tmp/meek/bin/meek-server /usr/bin \
&& rm -rf /tmp/meek \
2015-06-18 19:49:42 +08:00
&& apk del build-base \
2015-09-28 15:33:24 +08:00
git \
2015-06-18 19:49:42 +08:00
gmp-dev \
2015-09-28 15:41:16 +08:00
go \
2015-06-18 19:49:42 +08:00
python-dev \
2015-09-28 16:16:22 +08:00
&& rm -rf /var/cache/apk/*
2015-06-18 18:10:26 +08:00
COPY ./torrc /etc/tor/torrc
2015-09-28 13:30:31 +08:00
USER tor
2015-09-28 16:16:22 +08:00
WORKDIR /var/lib/tor
VOLUME /etc/tor /var/lib/tor
2015-10-27 10:51:45 +08:00
EXPOSE 7002 9001 9030 9050 9051
2015-06-18 18:10:26 +08:00
CMD ["/usr/bin/tor", "-f", "/etc/tor/torrc"]