2016-03-19 13:16:39 +00:00
|
|
|
# docker build -t my/zeronet .
|
|
|
|
# docker run -d -v ~/.zeronetdata:/data -p 43110:43110 my/zeronet
|
|
|
|
|
2016-03-19 10:27:52 +00:00
|
|
|
FROM alpine:3.3
|
|
|
|
MAINTAINER Andrey Arapov <andrey.arapov@nixaid.com>
|
|
|
|
|
|
|
|
RUN echo '@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories \
|
|
|
|
&& apk update \
|
|
|
|
&& apk add py-gevent@testing py-msgpack@testing wget ca-certificates
|
|
|
|
|
|
|
|
ENV USER zeronet
|
|
|
|
ENV UID 7000
|
|
|
|
ENV HOME /home/$USER
|
2016-03-19 13:16:39 +00:00
|
|
|
ENV PROJECT ZeroNet-master
|
|
|
|
ENV DATA /data
|
2016-03-19 10:27:52 +00:00
|
|
|
RUN adduser -D -u $UID -h $HOME -s /bin/true $USER
|
|
|
|
|
|
|
|
USER $USER
|
2016-03-19 13:16:39 +00:00
|
|
|
VOLUME [ "$DATA" ]
|
2016-03-19 10:27:52 +00:00
|
|
|
WORKDIR $HOME
|
|
|
|
RUN wget -q https://github.com/HelloZeroNet/ZeroNet/archive/master.tar.gz \
|
|
|
|
&& tar xpzf master.tar.gz \
|
|
|
|
&& rm -f master.tar.gz \
|
2016-03-19 13:16:39 +00:00
|
|
|
&& cd $PROJECT \
|
2016-03-19 10:27:52 +00:00
|
|
|
&& mkdir log \
|
2016-03-19 13:16:39 +00:00
|
|
|
&& touch log/error.log \
|
|
|
|
&& ln -sv $DATA ./data
|
2016-03-19 10:27:52 +00:00
|
|
|
|
2016-03-19 13:16:39 +00:00
|
|
|
# the launch script needs to chown the /data in case when $UID does not match
|
|
|
|
# the UID of the host
|
|
|
|
USER root
|
|
|
|
COPY launch ./$PROJECT/
|
|
|
|
CMD ./$PROJECT/launch
|