ZeroNet/Dockerfile

28 lines
810 B
Docker
Raw Normal View History

2020-03-24 02:26:54 +01:00
FROM alpine:3.11
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
2020-04-07 13:52:20 +02:00
# Install and configure dependencies
COPY requirements.txt /root/requirements.txt
2020-03-24 02:09:57 +01:00
RUN apk --update --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
2020-04-07 13:52:20 +02:00
# Add ZeroNet source
COPY . /root
2016-03-02 21:11:56 +01:00
VOLUME /root/data
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