forked from HelloZeroNet/ZeroNet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8281176
commit 6e51b5b
Showing
1 changed file
with
13 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |