From ad22816c2e8f6edfa208ed1f14bcf7f8610180a0 Mon Sep 17 00:00:00 2001 From: Andrey Arapov Date: Tue, 20 Jun 2017 20:32:27 +0200 Subject: [PATCH] updates --- Dockerfile | 6 +++--- README.md | 19 +++++++++++++------ docker-compose.yml | 3 +++ 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 760dfe1..381ea27 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ # docker build -t my/zeronet . # docker run -d --name zeronet -v ~/.zeronetdata:/data -p 43110:43110 my/zeronet -FROM alpine:3.3 +FROM alpine:latest MAINTAINER Andrey Arapov 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 + && apk add py-gevent@testing py-msgpack@testing wget ca-certificates python ENV USER zeronet ENV UID 7000 @@ -19,7 +19,7 @@ ENV DATA /data RUN adduser -D -u $UID -h $HOME -s /bin/true $USER -# Optionall you may want to enable Tor in order to anonymize the traffic +# Optionally you may want to enable Tor in order to anonymize the traffic RUN apk add tor@testing RUN echo -e "ControlPort 9051\nSocksListenAddress 0.0.0.0" > /etc/tor/torrc # RUN echo -e "ControlPort 9051" > /etc/tor/torrc diff --git a/README.md b/README.md index 21b0b2d..8f3687f 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,12 @@ Running Zeronet in Docker container Run === ``` -docker run -d --name zeronet -v zeronet_data:/data -p 43110:43110 -p 15441:15441 my/zeronet +docker run -d \ + --name zeronet + -v zeronet_data:/data + -p 127.0.0.1:43110:43110 + -p 15441:15441 + my/zeronet ``` Access @@ -19,14 +24,16 @@ 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 +If you are running your Web browser in the container, then you need to make +sure both containers are on the same network in order to access the ZeroNet WebUI. + ``` -docker run -d --name zeronet -v zeronet_data:/data --net firefox_net -p 15441:15441 my/zeronet +docker network connect glue +docker network connect glue chrome +docker network connect glue zeronet ``` -With docker-compose it is even simpler +Running zeronet with docker-compose: ``` docker-compose up -d ``` diff --git a/docker-compose.yml b/docker-compose.yml index 10c9547..b944d07 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,9 +5,12 @@ volumes: services: zeronet: + container_name: zeronet image: andrey01/zeronet + build: . network_mode: bridge ports: - 15441:15441 + - 127.0.0.1:43110:43110 volumes: - data:/data