fix:优化试题内容和样式排版

This commit is contained in:
Daniel
2026-04-18 20:20:38 +08:00
parent 15e71a9231
commit 7cb9b89cb0
644 changed files with 152784 additions and 621 deletions

View File

@@ -1,20 +1,26 @@
# 基础镜像来自 Docker Hub请在本机配置阿里云镜像加速器后再构建见仓库 docker-compose.yml 注释)
FROM node:22-alpine AS builder
# builderDebian bookworm + glibc避免 Alpine 下 Vite/esbuild 段错误
FROM node:22-bookworm-slim AS builder
WORKDIR /app
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
COPY package.json /app/package.json
# 阿里云镜像站指定的 npm 同步源(原淘宝镜像域名已迁移至 npmmirror
RUN npm config set registry https://registry.npmmirror.com && npm install
ARG NPM_REGISTRY=https://registry.npmmirror.com
ARG DEBIAN_MIRROR_HOST=mirrors.aliyun.com
RUN sed -i "s/deb.debian.org/${DEBIAN_MIRROR_HOST}/g; s/security.debian.org/${DEBIAN_MIRROR_HOST}/g" /etc/apt/sources.list.d/debian.sources
RUN npm config set registry "${NPM_REGISTRY}"
COPY package.json package-lock.json /app/
RUN npm ci
COPY . /app
RUN npm run build \
&& test -f /app/dist/index.html \
&& ls -la /app/dist
# 运行阶段Nginx Alpineapk 使用国内镜像加速
FROM nginx:1.27-alpine
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
ARG ALPINE_MIRROR_HOST=mirrors.aliyun.com
RUN sed -i "s/dl-cdn.alpinelinux.org/${ALPINE_MIRROR_HOST}/g" /etc/apk/repositories
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80