Install Docker and Docker Compose
JUDGER_REPO(default:https://github.com/CUP-ACM-Programming-Club/CUP-Online-Judge-Judger.git)JUDGER_REF(default:master)DAEMON_REPO(default:https://github.com/ryanlee2014/CUP-Online-Judge-Judge-Daemon-Service.git)DAEMON_REF(default:master)NODE_MAJOR(default:24 22 20 18 16 14)NODE_MAJOR_LIST(alias ofNODE_MAJOR, retained for compatibility)NODE_MAJOR/NODE_MAJOR_LISTare tried from left to right in build; the first Node major that can install and passnpm run build:main -- --skipLibCheckis used.KOTLIN_NATIVE_VERSION/KOTLIN_NATIVE_SHA256KOTLIN_COMPILER_VERSION/KOTLIN_COMPILER_SHA256
All build args can be overridden in CI or local docker build commands to pin external inputs when needed.
Recommended pattern for a pinned release:
--build-arg JUDGER_REF=<commit_sha>
--build-arg DAEMON_REF=<commit_sha>
--build-arg NODE_MAJOR="24 22 20 18 16 14"
--build-arg KOTLIN_NATIVE_SHA256=<sha256>
--build-arg KOTLIN_COMPILER_SHA256=<sha256>
The KOTLIN_*_SHA256 arguments are optional. Set them when you need deterministic artifacts; otherwise build still follows latest compatible upstream releases.
- CI rollback / reproducible release: pin
*_REFand bothKOTLIN_*_SHA256. - Build failures introduced by upstream changes: pin
NODE_MAJOR/NODE_MAJOR_LIST,NODEJS_SHA256, and git refs before rerunning. - Cross-region or air-gapped reproducibility: pin
KOTLIN_NATIVE_VERSIONandKOTLIN_COMPILER_VERSIONexplicitly to avoid transient metadata changes.
./init-env.sh./update.sh- Clone repo inside your project
git clone --recursive https://github.com/ryanlee2014/CUP-Online-Judge-NG-Docker-Judger.git docker-judger- Enter the folder and rename .env.example to .env, docker-compose.example.yml to docker-compose.yml
cd docker-judger
cp .env.example .env
cp docker-compose.example.xml docker.compose.yml- Enter the backend folder and rename config.sample.json to config.json
cd etc/backend
cp config.sample.json config.json- Enter the judge folder and rename config.sample.json to config.json Edit judger/etc/config.json and compile.json to your environment settings
# judge.conf
cd judge/etc
cp config.sample.json config.json
- Make
datafoler and move files into the folder or linkdatafolder tojudge/data
# make dir
mkdir -p ./judger/data
# link
ln -s path/to/data ./judger/data- Run your containers:
docker-compose up -dBecome a sponsor on afdian (Alipay only)