refactored
This commit is contained in:
parent
7148a84fbf
commit
8bf90a0a7e
18
Dockerfile
18
Dockerfile
@ -1,3 +1,6 @@
|
||||
# docker build -t my/zeronet .
|
||||
# docker run -d -v ~/.zeronetdata:/data -p 43110:43110 my/zeronet
|
||||
|
||||
FROM alpine:3.3
|
||||
MAINTAINER Andrey Arapov <andrey.arapov@nixaid.com>
|
||||
|
||||
@ -8,16 +11,23 @@ RUN echo '@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/ap
|
||||
ENV USER zeronet
|
||||
ENV UID 7000
|
||||
ENV HOME /home/$USER
|
||||
ENV PROJECT ZeroNet-master
|
||||
ENV DATA /data
|
||||
RUN adduser -D -u $UID -h $HOME -s /bin/true $USER
|
||||
|
||||
USER $USER
|
||||
VOLUME [ "$DATA" ]
|
||||
WORKDIR $HOME
|
||||
RUN wget -q https://github.com/HelloZeroNet/ZeroNet/archive/master.tar.gz \
|
||||
&& tar xpzf master.tar.gz \
|
||||
&& rm -f master.tar.gz \
|
||||
&& cd ZeroNet-master \
|
||||
&& cd $PROJECT \
|
||||
&& mkdir log \
|
||||
&& touch log/error.log
|
||||
&& touch log/error.log \
|
||||
&& ln -sv $DATA ./data
|
||||
|
||||
WORKDIR $HOME/ZeroNet-master
|
||||
CMD python zeronet.py --ui_ip 0.0.0.0
|
||||
# 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
|
||||
|
@ -12,7 +12,7 @@ docker build -t my/zeronet .
|
||||
Run
|
||||
===
|
||||
```
|
||||
docker run -d -p 43110:43110 my/zeronet
|
||||
docker run -d -v ~/.zeronetdata:/data -p 43110:43110 my/zeronet
|
||||
```
|
||||
|
||||
Access
|
||||
@ -28,7 +28,7 @@ If you already have your Web browser running in a container (e.g. Firefox in
|
||||
the `firefox_net` network), then you can run Zeronet container in the
|
||||
following way
|
||||
```
|
||||
docker run -d --name zeronet --net firefox_net my/zeronet
|
||||
docker run -d --name zeronet -v ~/.zeronetdata:/data --net firefox_net my/zeronet
|
||||
```
|
||||
|
||||
And access it via `http://zeronet:43110`
|
||||
|
Loading…
Reference in New Issue
Block a user