about summary refs log tree commit diff

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.