
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
26 lines
610 B
Docker
26 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
|