feat: 新增 compile-node 镜像(16/18/20/22/26),runtime-node 改基于 runtime-python315

This commit is contained in:
2026-11-15 11:14:59 +08:00
parent d48cc7c451
commit c594cece2d
25 changed files with 145 additions and 35 deletions
+5 -3
View File
@@ -1,4 +1,5 @@
FROM registry.cn-shanghai.aliyuncs.com/odboy/kenaito:system-alinux3
# 基于 python 运行时:Node 原生模块(node-gyp)需要 python3,直接复用现成镜像,避免重复装
FROM registry.cn-shanghai.aliyuncs.com/odboy/kenaito:runtime-python315
LABEL MAINTAINER="tianjun@odboy.cn"
ENV TimeZone=Asia/Shanghai
ENV NODE_HOME=/usr/local/node
@@ -17,5 +18,6 @@ RUN set -e && yum install \
node -v; \
npm -v;
# 全局 npm 源走阿里云(npmmirror),与 runtime-python310 的 pip.conf 对应
COPY npmrc /root/.npmrc
# 全局 npm 源走阿里云(npmmirror):Node 发行包自带 npm 的全局配置目录就是
# ${NODE_HOME}/etc/npmrc(npm prefix 为 NODE_HOME 时),放在这里对所有用户生效
COPY npmrc ${NODE_HOME}/etc/npmrc
+3 -4
View File
@@ -1,4 +1,3 @@
# 与 runtime-python310 的 ~/.pip/pip.conf 对应:全局 .npmrc,镜像内 npm 默认走阿里云源
registry=https://registry.npmmirror.com
# 下载原生模块 / electron 等二进制时也走阿里云
disturl=https://npmmirror.com/mirrors/node
# 阿里云 npm 源(npmmirror)。放在 npm 自带的全局配置旁,写成标准项,
# 不覆盖 npm 自身的 .npmrc(避免 npm warn Unknown user config)
registry=https://registry.npmmirror.com/