add Zeronet to a Docker container
This commit is contained in:
parent
d5ab828f13
commit
1ac52e0854
23
Dockerfile
Normal file
23
Dockerfile
Normal file
@ -0,0 +1,23 @@
|
||||
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
|
||||
RUN adduser -D -u $UID -h $HOME -s /bin/true $USER
|
||||
|
||||
USER $USER
|
||||
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 \
|
||||
&& mkdir log \
|
||||
&& touch log/error.log
|
||||
|
||||
WORKDIR $HOME/ZeroNet-master
|
||||
CMD python zeronet.py --ui_ip 0.0.0.0
|
28
Dockerfile.debian
Normal file
28
Dockerfile.debian
Normal file
@ -0,0 +1,28 @@
|
||||
FROM debian:jessie
|
||||
MAINTAINER Andrey Arapov <andrey.arapov@nixaid.com>
|
||||
|
||||
# To avoid problems with Dialog and curses wizards
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get -qy install python python-gevent python-msgpack wget
|
||||
|
||||
ENV USER zeronet
|
||||
ENV UID 7000
|
||||
ENV HOME /home/$USER
|
||||
RUN useradd -u $UID -m -d $HOME -s /usr/sbin/nologin $USER
|
||||
|
||||
RUN echo "UTC" > /etc/timezone \
|
||||
&& dpkg-reconfigure tzdata
|
||||
|
||||
USER $USER
|
||||
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 \
|
||||
&& mkdir log \
|
||||
&& touch log/error.log
|
||||
|
||||
WORKDIR $HOME/ZeroNet-master
|
||||
CMD python zeronet.py --ui_ip 0.0.0.0
|
34
README.md
Normal file
34
README.md
Normal file
@ -0,0 +1,34 @@
|
||||
Intro
|
||||
=====
|
||||
|
||||
Running Zeronet in Docker container
|
||||
|
||||
Build
|
||||
=====
|
||||
```
|
||||
docker build -t my/zeronet .
|
||||
```
|
||||
|
||||
Run
|
||||
===
|
||||
```
|
||||
docker run -d my/zeronet
|
||||
```
|
||||
|
||||
Access
|
||||
======
|
||||
```
|
||||
http://127.0.0.1:43110
|
||||
```
|
||||
|
||||
Additional notes
|
||||
================
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
And access it via `http://zeronet:43110`
|
Loading…
Reference in New Issue
Block a user