summaryrefslogtreecommitdiff
path: root/packaging/docker
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2015-04-19 11:58:28 +0200
committerLinus Nordberg <linus@nordberg.se>2015-04-19 12:06:02 +0200
commitacee8da8d350a8fe1a1cd3926955d81e9030aa18 (patch)
tree8c8154fe1eec6d53b70b02a2a70a5e8c39f71cb3 /packaging/docker
parent5ba78f137b020f5bc3136a5f72a99a82813210e4 (diff)
add onion service dockeronion
Diffstat (limited to 'packaging/docker')
-rw-r--r--packaging/docker/onion/Dockerfile10
-rw-r--r--packaging/docker/onion/start.sh9
2 files changed, 19 insertions, 0 deletions
diff --git a/packaging/docker/onion/Dockerfile b/packaging/docker/onion/Dockerfile
new file mode 100644
index 0000000..ddd961e
--- /dev/null
+++ b/packaging/docker/onion/Dockerfile
@@ -0,0 +1,10 @@
+FROM debian:jessie
+RUN apt-get update
+RUN echo 'debconf debconf/frontend select noninteractive' | debconf-set-selections
+RUN apt-get -y -q install tor
+RUN systemctl disable tor
+ADD start.sh /start.sh
+RUN chmod a+rx /start.sh
+VOLUME /etc/tor
+VOLUME /var/lib/tor/hs
+[ENTRYPOINT ["/start.sh"]
diff --git a/packaging/docker/onion/start.sh b/packaging/docker/onion/start.sh
new file mode 100644
index 0000000..6d14ae4
--- /dev/null
+++ b/packaging/docker/onion/start.sh
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+if ! [ -e /etc/tor/torrc ]; then
+ echo "SocksPort 0" >> /etc/tor/torrc
+ echo "HiddenServiceDir /var/lib/tor/hs" >> /etc/tor/torrc
+ echo "HiddenServicePort 80" >> /etc/tor/torrc
+fi
+
+/usr/bin/tor -f /etc/tor/torrc