-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
44 lines (37 loc) · 1.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Tor 0.3.3.6
FROM armhf/alpine:latest
MAINTAINER pajdk "https://hub.docker.com/r/pajdk/rpi-tor/"
EXPOSE 9001 9050
RUN build_pkgs=" \
openssl-dev \
zlib-dev \
libevent-dev \
gnupg \
" \
&& runtime_pkgs=" \
build-base \
openssl \
zlib \
libevent \
" \
&& apk --update add ${build_pkgs} ${runtime_pkgs}
RUN cd /tmp \
&& wget https://www.torproject.org/dist/tor-0.3.3.6.tar.gz \
&& wget https://www.torproject.org/dist/tor-0.3.3.6.tar.gz.asc \
&& gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 0x9E92B601 \
&& gpg --verify tor-0.3.3.6.tar.gz.asc \
&& tar xzvf tor-0.3.3.6.tar.gz \
&& cd /tmp/tor-0.3.3.6 \
&& ./configure \
&& make -j6 \
&& make install \
&& cd \
&& rm -rf /tmp/* \
&& apk del ${build_pkgs} \
&& rm -rf /var/cache/apk/*
RUN adduser -Ds /bin/sh tor
RUN mkdir /etc/tor
COPY torrc /etc/tor/
RUN mkdir /home/tor/.tor && chown tor:tor /home/tor/.tor -R
USER tor
CMD ["tor", "-f", "/etc/tor/torrc"]