Преглед изворни кода

修复 Docker 构建的安装脚本顺序与内核依赖校验

Samien пре 3 часа
родитељ
комит
6443bb2383
1 измењених фајлова са 4 додато и 3 уклоњено
  1. 4 3
      Dockerfile

+ 4 - 3
Dockerfile

@@ -6,13 +6,13 @@ WORKDIR /app
 
 COPY package.json package-lock.json ./
 COPY release.json ./
+COPY scripts ./scripts
+COPY bin ./bin
 RUN ELECTRON_SKIP_BINARY_DOWNLOAD=1 npm ci
 
 COPY tsconfig.json tsconfig.client.json tsconfig.client.build.json tsconfig.server.json vite.config.ts ./
 COPY index.html ./
 COPY public ./public
-COPY scripts ./scripts
-COPY bin ./bin
 COPY deploy ./deploy
 COPY third-party ./third-party
 COPY src ./src
@@ -23,7 +23,8 @@ RUN apt-get update \
   && apt-get install -y --no-install-recommends python3 python3-venv python3-dev build-essential \
   && rm -rf /var/lib/apt/lists/* \
   && python3 -m venv /app/.venv \
-  && /app/.venv/bin/pip install --no-cache-dir --require-hashes -r runtime/requirements.lock \
+  && /app/.venv/bin/pip install --no-cache-dir --no-deps --require-hashes -r runtime/requirements.lock \
+  && /app/.venv/bin/pip check \
   && find runtime -name __pycache__ -prune -exec rm -rf {} +
 
 RUN npm run build \