ZeroNet/Dockerfile
Sandro Jäckel a8a271e6fb
Update Dockerfile
Update to Alpine 3.8
Apply best practices eg:
- Don't upgrade
- Add --no-cache-dir to pip install
- Remove removing of any tmp folder as it is deprecated
- Format RUN block nicer
2018-12-08 13:32:28 +01:00

27 lines
610 B
Docker

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