Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
flibustier committed Jul 17, 2017
1 parent 8281176 commit 6e51b5b
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
FROM ubuntu:16.04

MAINTAINER Felix Imobersteg <[email protected]>
FROM alpine:3.6

#Base settings
ENV DEBIAN_FRONTEND noninteractive
ENV HOME /root

#Install ZeroNet
RUN \
apt-get update -y; \
apt-get -y install msgpack-python python-gevent python-pip python-dev tor; \
pip install msgpack-python --upgrade; \
apt-get clean -y; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*; \
echo "ControlPort 9051" >> /etc/tor/torrc; \
echo "CookieAuthentication 1" >> /etc/tor/torrc

RUN apk --update upgrade \
&& apk --no-cache --no-progress add musl-dev gcc python python-dev py2-pip tor \
&& pip install gevent msgpack-python \
&& apk del musl-dev gcc python-dev py2-pip \
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/* \
&& echo "ControlPort 9051" >> /etc/tor/torrc \
&& echo "CookieAuthentication 1" >> /etc/tor/torrc

#Add Zeronet source
ADD . /root
COPY . /root
VOLUME /root/data

#Control if Tor proxy is started
ENV ENABLE_TOR false

WORKDIR /root

#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 43110
EXPOSE 15441
EXPOSE 43110 15441

0 comments on commit 6e51b5b

Please sign in to comment.