Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions dodona-java.dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
FROM openjdk:8
FROM amazoncorretto:8-alpine-jdk

# Install jq for json querying in bash
RUN apt-get update \
&& apt-get install -y --no-install-recommends jshon=20131010-3+b1 \
&& rm -rf /var/lib/apt/lists/* \
# Make sure the students can't find our secret path, which is mounted in
# /mnt with a secure random name.
&& chmod 711 /mnt \
# Add the user which will run the student's code and the judge.
&& useradd -m runner
RUN <<EOF

Check warning on line 4 in dodona-java.dockerfile

View workflow job for this annotation

GitHub Actions / java

Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
set -eux

apk add --no-cache jq


# Make sure the students can't find our secret path, which is mounted in
# /mnt with a secure random name.
chmod 711 /mnt

# Add the user which will run the student's code and the judge.
adduser -u 1000 -S runner
rm -rf /var/cache/apk/*

EOF

# As the runner user
USER runner
Expand Down
Loading