These Dockerfiles allow you to run DOMjudge inside a Docker container.
Use Docker Compose to build the images:
$ docker-compose -f docker-compose-domserver.yml up --build
$ docker-compose -f docker-compose-judgehost.yml up --build
You may want to edit domserver/apache.conf.in
to enable TLS or tweak the PHP
upload restrictions.
All environment variables can be set in the relevant *.env
files.
The domserver compose file comes bundled with a MariaDB container. If you want
to use this, you only need to specify a password for the mysql root user and
for the domjudge user by setting DOMJUDGE_DB_ROOT_PASSWORD
and
MYSQL_ROOT_PASSWORD
to the root password, and DOMJUDGE_DB_PASSWORD
to the
domjudge user password. You can also use a standalone MySQL server. In that
case, you need to specify the DOMJUDGE_DB_HOST
variable. It is also possible
to specify a database name and domjudge user name (both default to domjudge
)
by setting DOMJUDGE_DB_NAME
and DOMJUDGE_DB_USER
.
You can also specify a timezone by setting the TIMEZONE
variable.
As for the judgehost, you need to run the container in privileged mode to use
cgroups. You also need to specify the domserver URL and judgehost user password
by setting DOMSERVER_HOST
, DOMSERVER_PASSWORD
. You can set DOMJUDGE_USER
as well, but it defaults to judgehost
. You should also specify a hostname for
this container to identify it in the domserver.
If you want to support more programming languages, you need to edit
judgehost/languages
to enable/disable languages. If a language you want isn't
listed, feel free to create an issue or submit a pull request!
You also need to specify the following kernel parameters on the container host
for cgroups: cgroup_enable=memory swapaccount=1
.
You can customize the DOMjudge source by adding patches to the patches
directories.
The ICPC tools can be used by domjudge with some work arounds. After setting up the contest and autojudges, the following steps can be used to get several tools working.
Make sure the contest is created and active
-
create an user for the event feed (e.g. event) with the roles
jury
,event_reader
andfull_event_reader
-
update the username and password and contest id in the file
eventdaemon.env
-
start the event deamon
$ docker-compose -f docker-compose-eventdaemon.yml up
-
Update the passwords and contest id in
cds.env
-
start the contest data server
$ docker-compose.exe -f docker-compose-cds.yml up --build
-
verify everything works by going to
https://<host>:8443/contests/<contest-id>
(The first time you visit this link, it will retrieve the data.)
Put a file banner.png
and logo.png
in the assets
folder. The banner will be displayed on the clock and message presentations.
Add in the photos
directory the images as jpg
or png
that you want to make available to the presentations client.
Select the Photos
presentation to display the images.
Add in the assets
directory files named logoA*.png
and logoB*.png
for their respective presentations.
Photo
presentations zoom a little and let image move diagonally over the screen. Logo
presentations are centered and don't move.
Download the latest version of Presentation Controller and unzip the file. Run the following command to connect to the cds
$ ./presAdmin.sh https://<cds-host> admin <adminPassword>
Download the latest version of Presentation Client and unzip the file. Run the following command to the connect to the cds.
$ ./client.sh <clientName> https://<cds-host>/api/contests/<contest-id> presentation <presentation-password>
Download the latest version of the Resolver and unzip the file. Generate the standing by running the awards
script
and connect to your cds using the url https://<cds-host>/api/contests/<contest-id>
with the admin
account.
Setup the standings as desired and save the file as awards.json
.
The file generated by awards(version 2.0-1798) does not create a valid event-feed. Workaround:
- download event feed from
https://<cds-host>/api/contests/<contest-id>/event-feed
toevent-feed.json
- open the newly created file
event-feed.json
- open the
awards.json
file and scroll tot he bottom - look for the
awards
lines
{"type":"awards","id":"cds2503","op":"create","data":{"id":"rank-1","team_ids":["3"],"citation":"1st place"}}
{"type":"awards","id":"cds2504","op":"create","data":{"id":"rank-2","team_ids":["6"],"citation":"2nd place"}}
{"type":"awards","id":"cds2505","op":"create","data":{"id":"rank-3","team_ids":["4"],"citation":"3rd place"}}
- copy these lines to the bottom of
event-feed.json
Now the scoreboard can be resolved with custom places and awards by executing
$ resolver event-feed.json
To have the contest logo and banner included in the resolver:
-
create a folder, e.g.
cdp
-
add in to the folder
event-feed.json
,logo.png
andbanner.png
-
start the resolver with the following command with the correct directory:
$ resolver .\cdp\