Make Tor optional in the Docker image and disable it by default as it's usage may be not allowed by hosting providers

This commit is contained in:
Aitor Pazos 2016-09-19 23:00:58 +01:00
parent 9e68a6f7e7
commit 39dc00ad78
2 changed files with 9 additions and 1 deletions

View file

@ -21,8 +21,11 @@ RUN \
ADD . /root
VOLUME /root/data
#Control if Tor proxy is started
ENV ENABLE_TOR false
#Set upstart command
CMD cd /root && /etc/init.d/tor start && python zeronet.py --ui_ip 0.0.0.0
CMD cd /root && (! ${ENABLE_TOR} || /etc/init.d/tor start) && python zeronet.py --ui_ip 0.0.0.0
#Expose ports
EXPOSE 43110