|
1 month ago | |
---|---|---|
hosted | 2 months ago | |
imgs | 1 month ago | |
src | 2 months ago | |
.drone.yml | 2 months ago | |
.gitignore | 2 months ago | |
Dockerfile | 2 months ago | |
README.md | 1 month ago |
Register a new companion
First, build an image:
$ docker build . -t circus-register
Then run the container:
$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock --net circus -p 8081:8081 circus-register:latest -initialVPNPort 1194
initialVPNPort
defines the first vpn port to be handed out to a companion
container.
This container should only show a small registration form for the user. The user inputs a name and recieves an access token and a link to a companion container.
All this contains does is run this command with a few custom values:
$ docker run \
--net circus \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $(pwd)/companion.json:/etc/companion.json \
-p 8086:8080 \
-d circus-companion:latest \
-username "Player 1" \
-accessCode theoneandonlyplayeroneisready \
-sessionSalt salty \
-vpnRemoteAddress 127.0.0.1 \
-vpnRemotePort 1193
What this command does:
That’s a lot, but all we need to do is to get a name for the user, generate a random access code, start the container and return the access code to the user.