about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-10-06 20:16:56 +0200
committerEmile <hanemile@protonmail.com>2019-10-06 20:16:56 +0200
commitee0df30b0f295c0a796b85fe3088202c1b882b97 (patch)
treed03d1c74c54c0392cf9f9269ad257537d017481a
parentd4dce83782b67236d2c8d99ffc9bdc89328bb5de (diff)
added a description to the README on how to use the container
-rw-r--r--README.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/README.md b/README.md
index 9308246..399a62e 100644
--- a/README.md
+++ b/README.md
@@ -9,3 +9,32 @@ containers. The container should simply get a list of all running containers
 using the docker socket (this is just an idea) and access a stats endpoint. The
 stats endpoint optimally exposes the name of the user the companion container
 belongs to and the amount of points the user has.
+
+## Setup
+
+First of all, make sure all the companion containers are part of the circus
+network. If you haven't defined a circus network, you can do so by running
+`docker network create circus` and running the companion containers using the
+`--net circus` flag.
+
+Running the scoreboard is done by first building the docker image:
+
+```
+$ docker build . -t circus-scoreboard
+...
+Successfully tagged circus-scoreboard:latest
+```
+
+... and then running the image:
+
+```
+docker run --rm -v /var/run/docker.sock:/var/run/docker.sock --net circus circus-scoreboard:latest
+```
+
+There are a few things to take note of:
+
+- The docker socket is mounted to enable the container to find the companion
+    containers. 
+- The container is inside of the circus network as are the companion containers.
+    This makes it possible to communicate inbetween the containers.
+