about summary refs log tree commit diff

circus-container-manager

This container manager containers and exposes an API for ALL other containers.

Function

This container exposes and api for all other containers to use. It should be the only container into which the docker-socket is mounted and all containers should communicate with it over an HTTP api.

Endpoints

/

IndexHandler

Handles requests to the "/" endpoint. Returns a small desription of what can be found where.

/api/companion/getChallenges

getChallengesHandler

get a list of all challenges (this is handled by the manager container as all that is needed is access to the database which is handled by the manager)

/api/companion/startContainer

startChallengeHandler

Handles starting a challenge and inserting it into the companion network.

The handler needs a few informations from the user in order to start the right container in the right context: - challenge name (the name of the docker-container) - networkName (the name of the network into which the container should be inserted into) - flag (the flag of the challenge)

The handler returns two things - the IP of the container - the container ID

/api/companion/stopContainer

stopContainerHandler

Handles stoping a container

The handler needs some information about what container to stop it: - container id

/api/companion/getRunningContainer