diff options
author | lolcat <will@lolcat.ca> | 2024-06-20 03:52:36 +0000 |
---|---|---|
committer | lolcat <will@lolcat.ca> | 2024-06-20 03:52:36 +0000 |
commit | 0b68d6b2a9928d1b9dae389fbf5b95056e678be0 (patch) | |
tree | 7a45bc4692b9be077bda192641917d6921b3ced3 /docker/tor | |
parent | 40da72e8554e9526379397a8c68f2895292a79c2 (diff) | |
parent | a0b3189198afff6632eee761b0d3a601ce09b43c (diff) |
Merge pull request 'docker_tor_documentation' (#22) from docker_tor_documentation into master
Reviewed-on: https://git.lolcat.ca/lolcat/4get/pulls/22
Diffstat (limited to 'docker/tor')
-rw-r--r-- | docker/tor/Dockerfile | 18 | ||||
-rw-r--r-- | docker/tor/torrc | 1 |
2 files changed, 19 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"] diff --git a/docker/tor/torrc b/docker/tor/torrc new file mode 100644 index 0000000..da32a7a --- /dev/null +++ b/docker/tor/torrc @@ -0,0 +1 @@ +SocksPort 0.0.0.0:9050 |