This commit is contained in:
zhinianboke 2025-09-27 20:28:07 +08:00
parent a09f2c3873
commit c7ba0bfde0
3 changed files with 27 additions and 0 deletions

View File

@ -30,6 +30,14 @@ RUN apt-get update && \
# 基础工具
nodejs \
npm \
build-essential \
gcc \
g++ \
make \
pkg-config \
patchelf \
git \
tzdata \
curl \
ca-certificates \
@ -73,6 +81,10 @@ RUN apt-get update && \
&& rm -rf /tmp/* \
&& rm -rf /var/tmp/*
# 降低编译内存占用(针对 Nuitka 构建阶段)
ENV CFLAGS="-O1" \
CXXFLAGS="-O1"
# 设置时区
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

View File

@ -31,6 +31,14 @@ RUN apt-get update && \
# 基础工具
nodejs \
npm \
build-essential \
gcc \
g++ \
make \
pkg-config \
patchelf \
git \
tzdata \
curl \
ca-certificates \
@ -76,6 +84,10 @@ RUN apt-get update && \
# 设置时区
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 降低编译内存占用(针对 Nuitka 构建阶段)
ENV CFLAGS="-O1" \
CXXFLAGS="-O1"
# 验证Node.js安装并设置环境变量
RUN node --version && npm --version

View File

@ -38,6 +38,9 @@ def build():
"--python-flag=no_docstrings",
"--python-flag=no_warnings",
"--enable-plugin=anti-bloat",
# 降低内存占用,避免容器内 OOM
"--lto=no",
"--jobs=1",
str(SRC)
]