Skip to content

Update java image #351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
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