add docker-compose file and updated README
This commit is contained in:
parent
7c406dac2d
commit
ee5b8df729
10
Dockerfile
10
Dockerfile
@ -11,16 +11,20 @@ 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_VER v0.3.5
|
||||
# ENV PROJECT ZeroNet-0.3.5
|
||||
ENV PROJECT_VER master
|
||||
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 \
|
||||
RUN wget -q https://github.com/HelloZeroNet/ZeroNet/archive/${PROJECT_VER}.tar.gz \
|
||||
&& tar xpzf ${PROJECT_VER}.tar.gz \
|
||||
&& rm -f ${PROJECT_VER}.tar.gz \
|
||||
&& cd $PROJECT \
|
||||
&& mkdir log \
|
||||
&& touch log/error.log \
|
||||
|
@ -12,7 +12,7 @@ docker build -t my/zeronet .
|
||||
Run
|
||||
===
|
||||
```
|
||||
docker run -d --name zeronet -v ~/.zeronetdata:/data -p 43110:43110 my/zeronet
|
||||
docker run -d --name zeronet -v zeronetdata:/data -p 43110:43110 my/zeronet
|
||||
```
|
||||
|
||||
Access
|
||||
@ -28,7 +28,12 @@ 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 -v ~/.zeronetdata:/data --net firefox_net my/zeronet
|
||||
docker run -d --name zeronet -v zeronetdata:/data --net firefox_net my/zeronet
|
||||
```
|
||||
|
||||
With docker-compose it is even simpler
|
||||
```
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
And access it via `http://zeronet:43110`
|
||||
|
18
docker-compose.yml
Normal file
18
docker-compose.yml
Normal file
@ -0,0 +1,18 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
zeronet:
|
||||
build: ./
|
||||
read_only: false
|
||||
networks:
|
||||
net:
|
||||
volumes:
|
||||
- data:/data
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
|
||||
networks:
|
||||
net:
|
||||
external:
|
||||
name: firefox_net
|
Loading…
Reference in New Issue
Block a user