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.
This commit is contained in:
+12
-15
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user