ZeroNet/Dockerfile

34 lines
844 B
Docker
Raw Normal View History

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
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 \
&& 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
#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
2021-12-02 20:18:16 +01:00
ENV ENABLE_TOR true
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