FROM debian:stable-slim RUN apt-get update && \ apt-get install -y --no-install-recommends tor iproute2 iptables ca-certificates && \ rm -rf /var/lib/apt/lists/* # Tor data dir RUN mkdir -p /var/lib/tor && chown -R debian-tor:debian-tor /var/lib/tor && chmod 700 /var/lib/tor COPY torrc /etc/tor/torrc # By default, run tor in foreground USER debian-tor CMD ["tor", "-f", "/etc/tor/torrc"]