main
mula.liu 2026-03-02 01:39:59 +08:00
parent 71ee1e2ca6
commit c1e59791a5
3 changed files with 5 additions and 4 deletions

View File

@ -13,7 +13,7 @@ FRONTEND_IMAGE_TAG=latest
# Optional build acceleration for China network # Optional build acceleration for China network
# If you mirror upstream container images, replace these with your mirror registry image names. # If you mirror upstream container images, replace these with your mirror registry image names.
PYTHON_BASE_IMAGE=python:3.12-slim PYTHON_BASE_IMAGE=python:3.12-slim
NODE_BASE_IMAGE=node:20-alpine NODE_BASE_IMAGE=node:22-alpine
NGINX_BASE_IMAGE=nginx:alpine NGINX_BASE_IMAGE=nginx:alpine
# Python package index mirror (recommended in CN) # Python package index mirror (recommended in CN)

View File

@ -43,7 +43,7 @@ services:
context: ./frontend context: ./frontend
dockerfile: Dockerfile dockerfile: Dockerfile
args: args:
NODE_BASE_IMAGE: ${NODE_BASE_IMAGE:-node:20-alpine} NODE_BASE_IMAGE: ${NODE_BASE_IMAGE:-node:22-alpine}
NGINX_BASE_IMAGE: ${NGINX_BASE_IMAGE:-nginx:alpine} NGINX_BASE_IMAGE: ${NGINX_BASE_IMAGE:-nginx:alpine}
NPM_REGISTRY: ${NPM_REGISTRY:-https://registry.npmjs.org/} NPM_REGISTRY: ${NPM_REGISTRY:-https://registry.npmjs.org/}
VITE_API_BASE: /api VITE_API_BASE: /api

View File

@ -1,4 +1,4 @@
ARG NODE_BASE_IMAGE=node:20-alpine ARG NODE_BASE_IMAGE=node:22-alpine
ARG NGINX_BASE_IMAGE=nginx:alpine ARG NGINX_BASE_IMAGE=nginx:alpine
FROM ${NODE_BASE_IMAGE} AS build FROM ${NODE_BASE_IMAGE} AS build
@ -7,7 +7,8 @@ WORKDIR /app
ARG NPM_REGISTRY=https://registry.npmjs.org/ ARG NPM_REGISTRY=https://registry.npmjs.org/
COPY package.json yarn.lock ./ COPY package.json yarn.lock ./
RUN corepack enable \ RUN npm config set registry "${NPM_REGISTRY}" \
&& npm install -g yarn@1.22.22 --registry "${NPM_REGISTRY}" \
&& yarn config set registry "${NPM_REGISTRY}" \ && yarn config set registry "${NPM_REGISTRY}" \
&& yarn install --frozen-lockfile --network-timeout 120000 && yarn install --frozen-lockfile --network-timeout 120000