FROM docker.io/library/debian:bookworm-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
 && apt-get install -y --no-install-recommends tor nyx ca-certificates tor-geoipdb \
 && rm -rf /var/lib/apt/lists/* \
 && mkdir -p /var/lib/tor /var/log/tor \
 && chown -R debian-tor:debian-tor /var/lib/tor /var/log/tor
EXPOSE 8080 9051
ENTRYPOINT ["/usr/bin/tor"]
CMD ["-f", "/etc/tor/torrc", "--runasdaemon", "0"]
