提交
This commit is contained in:
parent
a09f2c3873
commit
c7ba0bfde0
12
Dockerfile
12
Dockerfile
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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)
|
||||
]
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user