summaryrefslogtreecommitdiff
path: root/docker/tor/Dockerfile
diff options
context:
space:
mode:
authorgesang <gesang@itinerariummentis.org>2024-06-23 16:04:46 +0000
committergesang <gesang@itinerariummentis.org>2024-06-23 16:04:46 +0000
commit91116519ca1fc5cd15a1f0126718bf5875a224ff (patch)
tree836d93742d5544425e98a23d50eab2e3b2f3f719 /docker/tor/Dockerfile
parent2b476d5a076bc7bbe742e19f556f90526b1304b3 (diff)
parent0b68d6b2a9928d1b9dae389fbf5b95056e678be0 (diff)
wtf
Diffstat (limited to 'docker/tor/Dockerfile')
-rw-r--r--docker/tor/Dockerfile18
1 files changed, 18 insertions, 0 deletions
diff --git a/docker/tor/Dockerfile b/docker/tor/Dockerfile
new file mode 100644
index 0000000..9310f68
--- /dev/null
+++ b/docker/tor/Dockerfile
@@ -0,0 +1,18 @@
+FROM alpine:edge
+
+RUN apk add --no-cache curl tor
+
+EXPOSE 9050
+
+HEALTHCHECK --interval=60s --timeout=15s --start-period=20s \
+ CMD curl -x socks5h://127.0.0.1:9050 'https://check.torproject.org/api/ip' | grep -qm1 -E '"IsTor"\s*:\s*true'
+
+
+# default owner is tor, but running as root to avoid docker volume mount issue
+RUN chown -R root:root /var/lib/tor
+
+VOLUME ["/var/lib/tor/4get"]
+
+COPY ./torrc /etc/tor/torrc
+
+ENTRYPOINT ["/usr/bin/tor"]