From d64bf905d3531b7ba724eb0149d215434556213c Mon Sep 17 00:00:00 2001 From: plenarius Date: Tue, 21 Apr 2026 00:06:16 -0400 Subject: [PATCH] feat: optimize builder Dockerfile with pre-built release binaries Download neverwinter.nim tools, nasher, and layonara_nwn from GitHub Releases instead of compiling from source. Reduces build time from ~15 minutes to ~45 seconds. --- builder/Dockerfile | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/builder/Dockerfile b/builder/Dockerfile index 54b45d7..530814a 100644 --- a/builder/Dockerfile +++ b/builder/Dockerfile @@ -7,28 +7,25 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ cmake \ git \ curl \ - wget \ - unzip \ ca-certificates \ libssl-dev \ + libsqlite3-0 \ pkg-config \ && rm -rf /var/lib/apt/lists/* -# Install Nim via choosenim -RUN curl https://nim-lang.org/choosenim/init.sh -sSf | bash -s -- -y -ENV PATH="/root/.nimble/bin:${PATH}" -RUN choosenim 2.2.0 +# Pre-built neverwinter.nim tools (nwn_gff, nwn_script_comp, etc.) +RUN curl -L https://github.com/layonara/neverwinter.nim/releases/download/v2.1.2-layonara/neverwinter-tools-linux-x64.tar.gz \ + | tar xz -C /usr/local/bin/ -# Install neverwinter.nim tools (nwn_gff, nwn_script_comp, etc.) -RUN nimble install neverwinter@2.1.2 -y +# Pre-built nasher (NWN module build tool) +RUN curl -L https://github.com/squattingmonk/nasher.nim/releases/download/1.1.2/nasher_linux.tar.gz \ + | tar xz -C /usr/local/bin/ -# Install nasher -RUN nimble install nasher -y +# Pre-built layonara_nwn (hak builder) +RUN curl -L https://github.com/plenarius/layonara_nwn/releases/download/v0.1.1/layonara_nwn-linux-x64.tar.gz \ + | tar xz -C /usr/local/bin/ -# Install layonara_nwn (hak builder) -RUN nimble install https://github.com/plenarius/layonara_nwn -y - -# Verify tools -RUN nwn_gff --version && nasher --version && which nwn_script_comp +# Verify all tools +RUN nwn_gff --version && nasher --version && which nwn_script_comp && layonara_nwn --help | head -1 WORKDIR /build