Skip to content

Commit

Permalink
Use --privileged instead of --cap-add=sys_admin due to build error
Browse files Browse the repository at this point in the history
Encountring the following errors with --cap-add=sys_admin inside the dj_make_chroot script; one inside the debootstrap, and the other somewhere inside the script itself:

...
W: Failure trying to run: chroot "/chroot/domjudge" mount -t proc proc /proc
W: See /chroot/domjudge/debootstrap/debootstrap.log for details
...
mount: /chroot/domjudge/proc: cannot mount proc read-only.
       dmesg(1) may have more information after failed mount system call.
...

The /chroot/domjudge/debootstrap/debootstrap.log does not exist nor the dmesg to investigate further (naive approach OFC).
  • Loading branch information
agcom authored and vmcj committed Dec 12, 2023
1 parent be8721b commit c6b7e9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docker/build-judgehost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ docker build -t "${docker_tag}-build" -f judgehost/Dockerfile.build .
# Build chroot
builder_name=$(echo "${docker_tag}" | sed 's/[^a-zA-Z0-9_-]/-/g')
docker rm -f "${builder_name}" > /dev/null 2>&1 || true
docker run --name "${builder_name}" --cap-add=sys_admin "${docker_tag}-build"
docker run --name "${builder_name}" --privileged "${docker_tag}-build"
docker cp "${builder_name}:/chroot.tar.gz" .
docker cp "${builder_name}:/judgehost.tar.gz" .
docker rm -f "${builder_name}"
Expand Down

0 comments on commit c6b7e9d

Please sign in to comment.