A minimal Docker image (~13MB) with the Tor daemon running in the background.
latest
(/Dockerfile)
- Tor.
- Dnsmasq to run DNS queries through Tor.
- ProxyChains-NG.
proxychains_wrapper
helper script. See below.
$ docker pull zuazo/alpine-tor
$ docker run zuazo/alpine-tor wget -O- https://check.torproject.org/
This helper script starts the Tor daemon and runs the command passed in the arguments.
/ # proxychains_wrapper -h
Usage:
proxychains_wrapper [-h] [-u USER] COMMAND [...]
Example:
/ # proxychains_wrapper wget -O- https://check.torproject.org/
You can create your own images with the application that you want to run under Tor.
For example:
FROM zuazo/alpine-tor
RUN apk add --update \
nmap && \
rm -rf /var/cache/apk/* && \
adduser -D -s /bin/sh nmap
ENTRYPOINT ["/usr/bin/proxychains_wrapper", "-u", "nmap", "nmap"]
Then build and run the image:
$ docker build -t <user>/nmap-tor .
$ docker run <user>/nmap-tor -sT -Pn -n -sV -p 21,22,80 scanme.nmap.org
Waiting for Tor to boot.............
[proxychains] config file found: /etc/proxychains/proxychains.conf
[proxychains] preloading /usr/lib/libproxychains4.so
[proxychains] DLL init: proxychains-ng 4.8.1
Starting Nmap 6.47 ( http://nmap.org ) at 2015-10-29 21:47 UTC
Nmap scan report for scanme.nmap.org (224.0.0.1)
Host is up (8.1s latency).
PORT STATE SERVICE VERSION
21/tcp closed ftp
22/tcp open ssh (protocol 2.0)
80/tcp open http Apache httpd 2.4.7 ((Ubuntu))
Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 19.04 seconds
Other images created from this image:
FROM zuazo/alpine-tor
RUN echo 'socks4 myproxy.example.com 8080' >> $PROXYCHAINS_CONF
Instead of installing the image from Docker Hub, you can build the image from sources if you prefer:
$ git clone https://github.com/zuazo/alpine-tor-docker alpine-tor
$ cd alpine-tor
$ docker build -t zuazo/alpine-tor .