This is the code for the day 8 of the Advent of Corona challenge.
You may want to configure an .env
file in the root directory with the following structure
FLAG={some_flag}
SIZE={game_size}
TIMEOUT={timeout_in_seconds}
The defaults are:
FLAG=FLAG
SIZE=3
TIMEOUT=3600
Just run it via go
command, for developing, for example.
This will parse the root dir for an .env
file.
go run .
- Build
docker build -t sockit .
- Run
docker run -p 8080:8080 sockit:latest
, ordocker run -p 8080:8080 --env-file .env sockit:latest
if run with an env file.
If you are a lazy bastard, then just:
- Pull the image
docker pull tarasyarema/sockit:latest
- Run the container
docker run -p 8080:8080 --env-file .env tarasyarema/sockit:tagname