Merge pull request #1975 from krzotr/patch-2

Updated to python 3.6 in Dockerfile
This commit is contained in:
ZeroNet 2019-04-10 23:43:50 +02:00 committed by GitHub
commit efbf70726f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,15 +3,16 @@ FROM alpine:3.8
#Base settings #Base settings
ENV HOME /root ENV HOME /root
#Add Zeronet source
COPY . /root
#Install ZeroNet #Install ZeroNet
RUN apk --no-cache --no-progress add musl-dev gcc python python-dev py2-pip tor \ RUN apk --no-cache --no-progress add python3 python3-dev gcc libffi-dev musl-dev make tor openssl \
&& pip install --no-cache-dir gevent msgpack \ && pip3 install -r /root/requirements.txt \
&& apk del musl-dev gcc python-dev py2-pip \ && apk del python3-dev gcc libffi-dev musl-dev make \
&& echo "ControlPort 9051" >> /etc/tor/torrc \ && echo "ControlPort 9051" >> /etc/tor/torrc \
&& echo "CookieAuthentication 1" >> /etc/tor/torrc && echo "CookieAuthentication 1" >> /etc/tor/torrc
#Add Zeronet source
COPY . /root
VOLUME /root/data VOLUME /root/data
#Control if Tor proxy is started #Control if Tor proxy is started
@ -20,7 +21,7 @@ ENV ENABLE_TOR false
WORKDIR /root WORKDIR /root
#Set upstart command #Set upstart command
CMD (! ${ENABLE_TOR} || tor&) && python zeronet.py --ui_ip 0.0.0.0 --fileserver_port 26552 CMD (! ${ENABLE_TOR} || tor&) && python3 zeronet.py --ui_ip 0.0.0.0 --fileserver_port 26552
#Expose ports #Expose ports
EXPOSE 43110 26552 EXPOSE 43110 26552