feat: front base dockerfile
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
# =============================================================================
|
||||||
|
# nginx-base
|
||||||
|
# nginx 运行时阶段的公共基础镜像:只包含时区配置(apk 换源如有需要可在此追加)
|
||||||
|
# 构建: docker build -f nginx-base.Dockerfile -t your-registry/nginx-base:alpine .
|
||||||
|
# 推送: docker push your-registry/nginx-base:alpine
|
||||||
|
# =============================================================================
|
||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
ENV TZ=Asia/Shanghai
|
||||||
|
|
||||||
|
RUN apk add --no-cache tzdata \
|
||||||
|
&& ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
|
||||||
|
&& echo $TZ > /etc/timezone
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# =============================================================================
|
||||||
|
# node-pnpm-base
|
||||||
|
# 前端构建阶段的公共基础镜像:只包含 node 运行时 + 激活好的 pnpm,
|
||||||
|
# 不包含 pnpm install(install 依赖 package.json/lock,每个项目/每次依赖变更都不同,
|
||||||
|
# 所以不放进 base,留在业务 Dockerfile 里)
|
||||||
|
# 构建: docker build -f node-pnpm-base.Dockerfile -t your-registry/node-pnpm-base:24.18.1 .
|
||||||
|
# 推送: docker push your-registry/node-pnpm-base:24.18.1
|
||||||
|
# =============================================================================
|
||||||
|
FROM node:24.18.1-slim
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN corepack enable && corepack prepare pnpm@10.15.1 --activate
|
||||||
Reference in New Issue
Block a user