From 320ae922b07d66755dc3f460597bf4512e379906 Mon Sep 17 00:00:00 2001 From: lixin Date: Fri, 10 Jan 2025 14:25:19 +0800 Subject: [PATCH] =?UTF-8?q?build(Dockerfile):=20=E6=9B=B4=E6=96=B0=20Node.?= =?UTF-8?q?js=20=E7=89=88=E6=9C=AC=E5=B9=B6=E9=85=8D=E7=BD=AE=20Alpine=20?= =?UTF-8?q?=E9=95=9C=E5=83=8F=E5=8A=A0=E9=80=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 Node.js 版本从 22-alpine 更改为 lts-alpine,以使用长期支持版本 - 移除了注释,激活了 Alpine Linux 国内镜像加速配置 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2e3e5d7..8a0f299 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ -FROM node:22-alpine +FROM node:lts-alpine WORKDIR /app # 配置alpine国内镜像加速 -# RUN sed -i "s@http://dl-cdn.alpinelinux.org/@https://repo.huaweicloud.com/@g" /etc/apk/repositories +RUN sed -i "s@http://dl-cdn.alpinelinux.org/@https://repo.huaweicloud.com/@g" /etc/apk/repositories # 安装tzdata,默认的alpine基础镜像不包含时区组件,安装后可通过TZ环境变量配置时区 RUN apk add --no-cache tzdata