Parcourir la source

refactor(Dockerfile): 使用 alpine 版本基础镜像以减小体积

将基础镜像从官方 Node.js 改为 node:24-alpine,既固定了版本又减少了镜像体积
feige996 il y a 7 mois
Parent
commit
6289683fce
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      Dockerfile

+ 1 - 1
Dockerfile

@@ -1,4 +1,4 @@
-# 使用官方 Node.js 作为基础镜像;不适用 alpine 版本,这样可以自带git
+# 使用 node:24-alpine 作为基础镜像,固定版本+减少体积
 FROM node:24-alpine AS builder
 
 # 在容器中创建目录