tor-ctr/Dockerfile

32 lines
731 B
Text
Raw Normal View History

# run a tor socks proxy in a container
#
# docker run -d \
# --restart always \
# -v /etc/localtime:/etc/localtime:ro \
# -p 9050:9050 \
# --name torproxy \
# jess/tor-proxy
#
FROM r.batts.cloud/debian:bookworm
LABEL maintainer "vbatts <vbatts@hashbangbash.com>"
RUN apt update && \
apt install -y --no-install-recommends tor iptables gosu && \
rm -rf /var/lib/apt/lists/*
# expose socks port
EXPOSE 9050
# copy in our torrc file
COPY torrc.default /etc/tor/torrc.ours
COPY rc.firewall /etc/rc.firewall
COPY entrypoint.sh /entrypoint.sh
# make sure files are owned by tor user
RUN chown -R debian-tor /etc/tor
# running as limited user from inside the entrypoint.sh
#USER debian-tor
ENTRYPOINT [ "/entrypoint.sh" ]