From ee0df30b0f295c0a796b85fe3088202c1b882b97 Mon Sep 17 00:00:00 2001 From: Emile Date: Sun, 6 Oct 2019 20:16:56 +0200 Subject: added a description to the README on how to use the container --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'README.md') 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. + -- cgit 1.4.1