-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
40 lines (29 loc) · 1.38 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
FROM chambana/base:latest
MAINTAINER "Josh King <[email protected]>"
ENV DOCKER_HOST unix:///tmp/docker.sock
ENV DOCKER_GEN_VERSION 0.7.1
EXPOSE 9001
ADD files/apt/tor.list /etc/apt/sources.list.d/tor.list
RUN gpg --keyserver keys.gnupg.net --recv 886DDD89 && \
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
RUN apt-get -qq update && \
apt-get install -y --no-install-recommends ca-certificates \
wget \
supervisor \
deb.torproject.org-keyring \
tor && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Setup supervisord
ADD files/supervisor/supervisord.conf /etc/supervisor/supervisord.conf
# Install docker-gen
RUN wget https://github.com/jwilder/docker-gen/releases/download/$DOCKER_GEN_VERSION/docker-gen-linux-amd64-$DOCKER_GEN_VERSION.tar.gz \
&& tar -C /usr/local/bin -xvzf docker-gen-linux-amd64-$DOCKER_GEN_VERSION.tar.gz \
&& rm /docker-gen-linux-amd64-$DOCKER_GEN_VERSION.tar.gz
ADD files/docker-gen/torrc.tmpl /app/torrc.tmpl
VOLUME ["/var/lib/tor/hidden_services"]
WORKDIR /app
## Add startup script.
ADD bin/run.sh /app/bin/run.sh
RUN chmod 0755 /app/bin/run.sh
ENTRYPOINT ["/app/bin/run.sh"]
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]