Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/docker #785

Closed
wants to merge 12 commits into from
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[run]
source = ooni
[report]
omit = ooni/nettests/*, ooni/api/*, ooni/kit/*, ooni/contrib/*
omit = ooni/nettests/*, ooni/api/*, ooni/kit/*, ooni/contrib/* Dockerfile docker-compose.yml README.rst
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you don't need to add text files to test .coveragerc. Since those are not source files, it will already be ignored by coverage.py.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense. will add a commit for that

26 changes: 24 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,28 @@ that you have the ``universe`` repository enabled. The ``universe`` repository
is enabled by default in a standard Ubuntu installation but may not be on some
minimal, or not standard, installations.

On Docker::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you have an extra : in here.


Required dependencies installed on the target system:
- Docker
- docker-compose

You can pull the image from our Docker Hub
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to put at the end of the line :: so that it considers this a code block (as opposed to inline code)


docker pull openobservatory/ooni-probe:latest
docker run -p 8842:8842 -d openobservatory/ooni-probe:latest

If you prefer to run the ooni-probe in a more persistent manner on your host
you can add `--restart always` to the execution.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here it's the same as above.


docker run -p 8842:8842 --restart always -d openobservatory/ooni-probe:latest

On the other hand you can also build the image on your local machine:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you are missing an extra :

git clone https://github.com/TheTorProject/ooni-probe.git
docker-compose build
docker-compose up
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you replace these two commands with just vanilla docker (without docker-compose) and remove the docker-compose dependency in the above lines?


Installation
============

Expand Down Expand Up @@ -150,8 +172,8 @@ Configuring ooniprobe
---------------------

After successfully installing ooniprobe you should be able to access the web UI
on your host machine at <http://localhost:8842/> after running::
ooniprobe -w
on your host machine at <http://localhost:8842/> after running::
ooniprobe -w
or starting the daemon.

You should now be presented with the web UI setup wizard where you can read the
Expand Down
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: '2'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think given that it's just a single service we don't really need a docker-compose.yml file. We can just use plain docker or wrap the commands above in a shell script.

services:
ooni-probe:
build: .
image: openobservatory/ooni-probe:latest
ports:
- "8842:8842"