blob: 034e865c47364480605de84db5b5823d3e1c8180 (
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
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# 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`
|