From 2c9041f65df4fb374ff1ed1fc2fe15f26b9a65f1 Mon Sep 17 00:00:00 2001 From: ping <dev@guillaumepin.ch> Date: Tue, 25 Feb 2025 12:02:29 +0100 Subject: [PATCH] Update Dockefile to reduce build time --- live_exam_os/Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/live_exam_os/Dockerfile b/live_exam_os/Dockerfile index 10f8c84..398bd7a 100644 --- a/live_exam_os/Dockerfile +++ b/live_exam_os/Dockerfile @@ -4,7 +4,7 @@ FROM ubuntu:22.04 ENV archive=go1.22.6.linux-amd64.tar.gz ENV PATH=$PATH:/usr/local/go/bin -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y gcc pkg-config git wget make ca-certificates libglfw3-dev libxcursor-dev libxinerama-dev libxi-dev libxxf86vm-dev upx-ucl curl cryptsetup squashfs-tools fakechroot debootstrap xorriso mtools dosfstools +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y gcc pkg-config git wget make ca-certificates libglfw3-dev libxcursor-dev libxinerama-dev libxi-dev libxxf86vm-dev upx-ucl curl cryptsetup squashfs-tools fakechroot debootstrap xorriso mtools dosfstools gnutls-bin RUN git clone https://github.com/limine-bootloader/limine.git --branch=v8.x-binary --depth=1 /opt/limine && \ cd /opt/limine && \ @@ -15,8 +15,12 @@ RUN git config --global --add safe.directory /data RUN wget https://go.dev/dl/$archive && tar -C /usr/local -xzf $archive +# This part is used to compile the dependencies so that you don't have to do it every time you run the build.sh script (it saves around 2.5 minutes). WORKDIR /nexus COPY src src +COPY Makefile . +COPY config config -RUN cd src/client && go mod download +RUN cd config/certs && ./gen-cert.sh ca.info nexus-server.info /nexus/certs +RUN make build_nexus-exam SERVER='127.0.0.1:1077' CERT='certs/ca-cert.pem' EXAM_USER='user' EXAM_PWD='pwd' -- GitLab