Skip to content
Snippets Groups Projects
Commit c77f0f5e authored by ping's avatar ping
Browse files

Update Dockerfile to download nexus-exam dependencies

parent c7363dd4
No related branches found
No related tags found
No related merge requests found
...@@ -11,13 +11,12 @@ RUN git clone https://github.com/limine-bootloader/limine.git --branch=v8.x-bina ...@@ -11,13 +11,12 @@ RUN git clone https://github.com/limine-bootloader/limine.git --branch=v8.x-bina
make && \ make && \
cp /opt/limine/limine /bin/ cp /opt/limine/limine /bin/
RUN git config --global --add safe.directory /data
RUN wget https://go.dev/dl/$archive && tar -C /usr/local -xzf $archive RUN wget https://go.dev/dl/$archive && tar -C /usr/local -xzf $archive
WORKDIR /nexus WORKDIR /nexus
RUN mkdir src
COPY src src COPY src src
COPY Makefile .
COPY ca-cert.pem .
RUN make build_nexus-exam SERVER="127.0.0.1:1077" CERT="ca-cert.pem" EXAM_USER="user" EXAM_PWD="pwd" RUN cd src/client && go mod download
...@@ -5,13 +5,12 @@ ...@@ -5,13 +5,12 @@
echo " [Compiling nexus-exam...]" echo " [Compiling nexus-exam...]"
pushd .. > /dev/null pushd .. > /dev/null
run_command make build_nexus-exam SERVER=$SERVER CERT=$CERT EXAM_USER=$EXAM_USER EXAM_PWD=$EXAM_PWD run_command make build_nexus-exam SERVER=$SERVER CERT=$CERT EXAM_USER=$EXAM_USER EXAM_PWD=$EXAM_PWD
check_exit_code $? "Error during nexus-exam compilation"
if [[ "$ROOTFS_DIR" != /* ]]; then if [[ "$ROOTFS_DIR" != /* ]]; then
mkdir -p live_exam_os/$ROOTFS_DIR/usr/local/bin run_command mkdir -p live_exam_os/$ROOTFS_DIR/usr/local/bin
cp build/nexus-exam live_exam_os/$ROOTFS_DIR/usr/local/bin/nexus-exam run_command cp build/nexus-exam live_exam_os/$ROOTFS_DIR/usr/local/bin/nexus-exam
else else
mkdir -p $ROOTFS_DIR/usr/local/bin run_command mkdir -p $ROOTFS_DIR/usr/local/bin
cp build/nexus-exam $ROOTFS_DIR/usr/local/bin/nexus-exam run_command cp build/nexus-exam $ROOTFS_DIR/usr/local/bin/nexus-exam
fi fi
make clean_client run_command make clean_client
popd > /dev/null popd > /dev/null
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment