about summary refs log tree commit diff
path: root/README.md
blob: 399a62e82563cbc2644842821656cdf0e41713be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# circus-scoreboard

Scoreboard displaying the rankings of all companions in the swarm

## Function

This container displays a scoreboard ranking the individual companion
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.