2020-03-24 02:26:54 +01:00
|
|
|
FROM alpine:3.11
|
2015-05-27 15:13:36 +02:00
|
|
|
|
2019-09-30 21:37:56 +02:00
|
|
|
# Base settings
|
2015-05-27 15:13:36 +02:00
|
|
|
ENV HOME /root
|
2019-09-30 21:37:56 +02:00
|
|
|
WORKDIR /root
|
2015-05-27 15:13:36 +02:00
|
|
|
|
2020-04-07 13:52:20 +02:00
|
|
|
# Install and configure dependencies
|
2019-07-03 14:18:54 +02:00
|
|
|
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 \
|
2019-09-30 21:37:56 +02:00
|
|
|
&& 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 \
|
2018-12-08 13:30:17 +01:00
|
|
|
&& 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
|
2019-07-03 14:18:54 +02:00
|
|
|
COPY . /root
|
2016-03-02 21:11:56 +01:00
|
|
|
VOLUME /root/data
|
2015-05-27 15:13:36 +02:00
|
|
|
|
2019-09-30 21:37:56 +02:00
|
|
|
# Control if Tor proxy is started
|
2016-09-20 00:00:58 +02:00
|
|
|
ENV ENABLE_TOR false
|
|
|
|
|
2019-09-30 21:37:56 +02:00
|
|
|
# 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
|
|
|
|
2019-09-30 21:37:56 +02:00
|
|
|
# Expose ports
|
2018-04-18 04:10:11 +02:00
|
|
|
EXPOSE 43110 26552
|