From c1e59791a58a21f6d8212b7b0ae17d5bb63ec4b7 Mon Sep 17 00:00:00 2001 From: "mula.liu" Date: Mon, 2 Mar 2026 01:39:59 +0800 Subject: [PATCH] fix bugs --- .env.prod.example | 2 +- docker-compose.prod.yml | 2 +- frontend/Dockerfile | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.env.prod.example b/.env.prod.example index 94e78b8..f9848ba 100644 --- a/.env.prod.example +++ b/.env.prod.example @@ -13,7 +13,7 @@ FRONTEND_IMAGE_TAG=latest # Optional build acceleration for China network # If you mirror upstream container images, replace these with your mirror registry image names. PYTHON_BASE_IMAGE=python:3.12-slim -NODE_BASE_IMAGE=node:20-alpine +NODE_BASE_IMAGE=node:22-alpine NGINX_BASE_IMAGE=nginx:alpine # Python package index mirror (recommended in CN) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index d8202b3..6d0a711 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -43,7 +43,7 @@ services: context: ./frontend dockerfile: Dockerfile 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} NPM_REGISTRY: ${NPM_REGISTRY:-https://registry.npmjs.org/} VITE_API_BASE: /api diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 65bc75b..fd78b19 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,4 +1,4 @@ -ARG NODE_BASE_IMAGE=node:20-alpine +ARG NODE_BASE_IMAGE=node:22-alpine ARG NGINX_BASE_IMAGE=nginx:alpine FROM ${NODE_BASE_IMAGE} AS build @@ -7,7 +7,8 @@ WORKDIR /app ARG NPM_REGISTRY=https://registry.npmjs.org/ 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 install --frozen-lockfile --network-timeout 120000