Dockerfile to install Tor project, running as a SOCKS5 server on port 9050. It's running on ClientOnly
mode.
$ docker pull consatan/tor
$ git clone https://github.com/consatan/docker_tor_clientonly
$ cd docker_tor_clientonly
$ docker build . -t consatan/tor
$ docker run -d --name tor_instance -p 127.0.0.1:9050:9050 consatan/tor
# return your external ip
$ curl http://httpbin.org/ip
# return exit node ip
$ curl -x socks5h://127.0.0.1:9050 http://httpbin.org/ip
$ docker log tor_instance
$ docker stop tor_instance