Skip to content

winkler-winsen/docker-tor-from-src

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-tor-from-src

Create Docker image from Tor source based on debian:stable-slim image.

I've searched a way to run a to middle-guard relay in Docker.

Thanks to Jannis Seeman for this great course in Docker Docker komplett: Vom Anfänger zum Profi (inkl. Kubernetes).

Docker build arguments

  • TORVER: tor source version
  • CompilerThreads: CPU threads to use for compiling during build process. Set this to max CPU cores or threads.
  • EXPOSEPORT: Port that is exposed to host.

Environment variables

Please set User ID and Group ID to match existing account in host system for exchange date via volume.

UNAME="debian-tor"
UID="1000"
GID="1000"

Please see torrc.sample file for detailed explanation.

Nickname="nickname"
ContactInfo="Random Person <nobody AT example dot com>"
RelayBandwidthRate="100 KB"
RelayBandwidthBurst="200 KB"
ORPortAdv="4431"
ORPortListen="${EXPOSEPORT}"
ExitRelay="0"
SocksPort="0"
Log="notice stderr"

Docker example:

docker build --tag debtor .
docker container create --name debtor -e UID=1031 -e GID=100 -v ${PWD}\usr_local_etc_tor\:/usr/local/etc/tor/ -p 4431:9050 --restart always debtor
docker container start debtor