2021-12-02 20:18:16 +01:00
|
|
|
FROM alpine:3.15
|
2015-05-27 15:13:36 +02:00
|
|
|
|
|
|
|
#Base settings
|
|
|
|
ENV HOME /root
|
|
|
|
|
2019-07-03 14:18:54 +02:00
|
|
|
COPY requirements.txt /root/requirements.txt
|
2019-04-10 23:08:09 +02:00
|
|
|
|
2016-03-17 20:12:30 +01:00
|
|
|
#Install ZeroNet
|
2021-12-02 20:18:16 +01:00
|
|
|
RUN apk --update --no-cache --no-progress add python3 python3-dev py3-pip gcc g++ autoconf automake libtool libffi-dev musl-dev make tor openssl \
|
2019-04-10 23:08:09 +02:00
|
|
|
&& pip3 install -r /root/requirements.txt \
|
2021-12-02 20:18:16 +01:00
|
|
|
&& apk del python3-dev gcc g++ autoconf automake libtool libffi-dev musl-dev make \
|
2018-12-08 13:30:17 +01:00
|
|
|
&& echo "ControlPort 9051" >> /etc/tor/torrc \
|
2020-03-24 02:09:57 +01:00
|
|
|
&& echo "CookieAuthentication 1" >> /etc/tor/torrc
|
|
|
|
|
|
|
|
RUN python3 -V \
|
2020-03-24 01:58:33 +01:00
|
|
|
&& python3 -m pip list \
|
|
|
|
&& tor --version \
|
|
|
|
&& openssl version
|
2015-05-27 15:13:36 +02:00
|
|
|
|
2019-07-03 14:18:54 +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
|
|
|
|
2016-09-20 00:00:58 +02:00
|
|
|
#Control if Tor proxy is started
|
2021-12-02 20:18:16 +01:00
|
|
|
ENV ENABLE_TOR true
|
2016-09-20 00:00:58 +02:00
|
|
|
|
2017-07-17 16:08:18 +02:00
|
|
|
WORKDIR /root
|
|
|
|
|
2015-05-27 15:13:36 +02:00
|
|
|
#Set upstart command
|
2021-12-02 20:18:16 +01:00
|
|
|
CMD (! ${ENABLE_TOR} || tor&) && python3 zeronet.py --ui_ip 0.0.0.0 --fileserver_port 26117
|
2015-05-27 15:13:36 +02:00
|
|
|
|
|
|
|
#Expose ports
|
2021-12-02 20:18:16 +01:00
|
|
|
EXPOSE 43110 26117
|