Update Dockerfile
This commit is contained in:
parent
8281176873
commit
6e51b5ba32
1 changed files with 13 additions and 17 deletions
30
Dockerfile
30
Dockerfile
|
@ -1,32 +1,28 @@
|
||||||
FROM ubuntu:16.04
|
FROM alpine:3.6
|
||||||
|
|
||||||
MAINTAINER Felix Imobersteg <felix@whatwedo.ch>
|
|
||||||
|
|
||||||
#Base settings
|
#Base settings
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
|
||||||
ENV HOME /root
|
ENV HOME /root
|
||||||
|
|
||||||
#Install ZeroNet
|
#Install ZeroNet
|
||||||
RUN \
|
RUN apk --update upgrade \
|
||||||
apt-get update -y; \
|
&& apk --no-cache --no-progress add musl-dev gcc python python-dev py2-pip tor \
|
||||||
apt-get -y install msgpack-python python-gevent python-pip python-dev tor; \
|
&& pip install gevent msgpack-python \
|
||||||
pip install msgpack-python --upgrade; \
|
&& apk del musl-dev gcc python-dev py2-pip \
|
||||||
apt-get clean -y; \
|
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/* \
|
||||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*; \
|
&& 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
|
#Add Zeronet source
|
||||||
ADD . /root
|
COPY . /root
|
||||||
VOLUME /root/data
|
VOLUME /root/data
|
||||||
|
|
||||||
#Control if Tor proxy is started
|
#Control if Tor proxy is started
|
||||||
ENV ENABLE_TOR false
|
ENV ENABLE_TOR false
|
||||||
|
|
||||||
|
WORKDIR /root
|
||||||
|
|
||||||
#Set upstart command
|
#Set upstart command
|
||||||
CMD cd /root && (! ${ENABLE_TOR} || /etc/init.d/tor start) && python zeronet.py --ui_ip 0.0.0.0
|
CMD (! ${ENABLE_TOR} || tor&) && python zeronet.py --ui_ip 0.0.0.0
|
||||||
|
|
||||||
#Expose ports
|
#Expose ports
|
||||||
EXPOSE 43110
|
EXPOSE 43110 15441
|
||||||
EXPOSE 15441
|
|
||||||
|
|
Loading…
Reference in a new issue