Last active
July 15, 2023 10:28
-
-
Save st3b1t/5c933edb99308ef32bf87ae786eeab33 to your computer and use it in GitHub Desktop.
Tor Node Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:stable-slim | |
ARG PUB_CONTROLIP=0.0.0.0 | |
ARG PUB_CONTROLPORT=9052 | |
#ACCESSLOG /var/log/rinetd.log | |
RUN apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retires=10 install --no-install-recommends -y \ | |
ca-certificates curl gnupg && \ | |
printf 'deb http://deb.torproject.org/torproject.org stable main' >> /etc/apt/sources.list && \ | |
curl https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | apt-key add - && \ | |
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retires=10 install --no-install-recommends -y \ | |
rinetd \ | |
tor && \ | |
apt-get clean && \ | |
rm -rf /var/lib/apt/lists/* | |
RUN chown debian-tor /etc/tor/torrc | |
RUN printf '\nSocksPort 0.0.0.0:9050\nControlPort 9051\n' >> /etc/tor/torrc | |
RUN printf '$PUB_CONTROLIP\t$PUB_CONTROLPORT\t127.0.0.1\t9051\n' >> /etc/rinetd.conf | |
USER debian-tor | |
CMD /usr/sbin/rinetd && /usr/bin/tor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment