ZeroNet/Dockerfile

27 lines
740 B
Docker
Raw Normal View History

FROM alpine:3.8
2015-05-27 15:13:36 +02:00
# Base settings
2015-05-27 15:13:36 +02:00
ENV HOME /root
WORKDIR /root
2015-05-27 15:13:36 +02:00
# Add ZeroNet source
COPY . /root
VOLUME /root/data
2019-04-10 23:08:09 +02:00
# Install dependencies
2019-04-10 23:08:09 +02:00
RUN apk --no-cache --no-progress add python3 python3-dev gcc libffi-dev musl-dev make tor openssl \
&& pip3 install -r requirements.txt \
&& for PLUGIN in $(ls plugins/[^disabled-]*/requirements.txt); do pip3 install -r ${PLUGIN}; done \
2019-04-10 23:08:09 +02:00
&& apk del python3-dev gcc libffi-dev musl-dev make \
&& echo "ControlPort 9051" >> /etc/tor/torrc \
&& echo "CookieAuthentication 1" >> /etc/tor/torrc
2015-05-27 15:13:36 +02:00
# Control if Tor proxy is started
ENV ENABLE_TOR false
# Set upstart command
2019-04-10 23:08:09 +02:00
CMD (! ${ENABLE_TOR} || tor&) && python3 zeronet.py --ui_ip 0.0.0.0 --fileserver_port 26552
2015-05-27 15:13:36 +02:00
# Expose ports
2018-04-18 04:10:11 +02:00
EXPOSE 43110 26552