Skip to content

Commit c6b7e9d

Browse files
agcomvmcj
authored andcommitted
Use --privileged instead of --cap-add=sys_admin due to build error
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).
1 parent be8721b commit c6b7e9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docker/build-judgehost.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ docker build -t "${docker_tag}-build" -f judgehost/Dockerfile.build .
1212
# Build chroot
1313
builder_name=$(echo "${docker_tag}" | sed 's/[^a-zA-Z0-9_-]/-/g')
1414
docker rm -f "${builder_name}" > /dev/null 2>&1 || true
15-
docker run --name "${builder_name}" --cap-add=sys_admin "${docker_tag}-build"
15+
docker run --name "${builder_name}" --privileged "${docker_tag}-build"
1616
docker cp "${builder_name}:/chroot.tar.gz" .
1717
docker cp "${builder_name}:/judgehost.tar.gz" .
1818
docker rm -f "${builder_name}"

0 commit comments

Comments
 (0)