diff --git a/live_exam_os/Dockerfile b/live_exam_os/Dockerfile index a68b853d6fe615600fdda0629eef6d7ed69a5d23..98ab76c614f23b91162e1036f91b710dfd29754c 100644 --- a/live_exam_os/Dockerfile +++ b/live_exam_os/Dockerfile @@ -10,9 +10,18 @@ ARG cert ARG exam_user ARG exam_pwd +RUN apt-get update && apt-get install -y gcc pkg-config git wget make ca-certificates libglfw3-dev libxcursor-dev libxinerama-dev libxi-dev libxxf86vm-dev upx-ucl + +# Install go 1.22 from the official GO site +ENV archive=go1.22.6.linux-amd64.tar.gz +ENV PATH=$PATH:/usr/local/go/bin +WORKDIR /go +RUN wget https://go.dev/dl/$archive +RUN tar -C /usr/local -xzf $archive + +# Compile nexus-exam WORKDIR /nexus COPY ${base_dir} . -RUN apt-get update && apt-get install -y golang-go make ca-certificates libglfw3-dev libxcursor-dev libxinerama-dev libxi-dev libxxf86vm-dev upx-ucl RUN make build_nexus-exam SERVER=${server_ip}:${server_port} CERT=${cert} EXAM_USER=${exam_user} EXAM_PWD=${exam_pwd} #-------------------------------------------------------------------------------------------------------------------- diff --git a/live_exam_os/build_live_exam_iso b/live_exam_os/build_live_exam_iso index e36e73fc38318b60eda9de6ef648c073470e2cb5..b85da1404dc1553a1c1c5d4e283872cdb93dc356 100755 --- a/live_exam_os/build_live_exam_iso +++ b/live_exam_os/build_live_exam_iso @@ -28,9 +28,10 @@ build_docker_image () { mkdir $dir || abort # Copy pub certificate cp $CERT $dir || abort - # Copy Makefile and sources files + # Copy Makefile, sources files and git files (as we insert the git commit hash into nexus-exam) cp ../Makefile $dir || abort cp -r ../src $dir || abort + cp -r ../.git $dir || abort cert_file=`basename $CERT` # build context is ".." since we need access to the ../src directory in order to build nexus-exam