26 lines
1 KiB
Docker
26 lines
1 KiB
Docker
FROM debian:stretch
|
|
|
|
ARG HiddenServiceDir="/var/lib/tor/hidden-service"
|
|
ARG HiddenServicePort="80 172.17.0.1:8000"
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y gpg apt-transport-https
|
|
|
|
RUN echo "deb http://deb.torproject.org/torproject.org stretch main" > /etc/apt/sources.list.d/tor.list && \
|
|
echo "deb-src http://deb.torproject.org/torproject.org stretch main" >> /etc/apt/sources.list.d/tor.list && \
|
|
cd /tmp && \
|
|
gpg --recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 && \
|
|
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y tor deb.torproject.org-keyring
|
|
|
|
RUN echo "Log notice file /var/log/tor/notices.log" > /etc/tor/torrc && \
|
|
echo "HiddenServiceDir ${HiddenServiceDir}" >> /etc/tor/torrc && \
|
|
echo "HiddenServicePort ${HiddenServicePort}" >> /etc/tor/torrc && \
|
|
mkdir ${HiddenServiceDir} && \
|
|
chmod 700 ${HiddenServiceDir} && \
|
|
chown debian-tor:debian-tor ${HiddenServiceDir} && \
|
|
service tor restart
|
|
|
|
ENTRYPOINT service tor restart && ping localhost && /bin/bash
|