Download Dockerfile from devboxbd/tor: direct link, hf CLI and curl.
- Browser
- Download file 521 Bytes
-
https://huggingface.co/spaces/devboxbd/tor/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/devboxbd/tor/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/devboxbd/tor/resolve/main/Dockerfile
521 Bytes
| FROM ubuntu:22.04 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # install tor only (no service usage) | |
| RUN apt-get update && apt-get install -y \ | |
| tor \ | |
| curl \ | |
| net-tools \ | |
| && apt-get clean | |
| # create user | |
| RUN useradd -m user | |
| USER user | |
| WORKDIR /home/user | |
| # IMPORTANT: run tor in user mode (NO /run access) | |
| CMD bash -c "\ | |
| tor --RunAsDaemon 0 --SocksPort 0.0.0.0:9050 & \ | |
| sleep 5 && \ | |
| echo 'Tor running on port 9050' && \ | |
| curl --socks5-hostname 127.0.0.1:9050 https://check.torproject.org/api/ip && \ | |
| tail -f /dev/null" |