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

Update Dockefile to reduce build time

parent 7cf1d613
Branches
No related tags found
No related merge requests found
......@@ -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'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment