From 18e9200be2ddb7dbb72338501c8fae92b396a7f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=BD=AE?= Date: Thu, 7 May 2026 23:00:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E8=8A=82=E7=A0=81=E4=B8=8D=E7=BC=96?= =?UTF-8?q?=E8=AF=91/skills=20/projects/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 14a6ecb..e7b63a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,9 +55,9 @@ FROM base AS bytecode-builder # 复制应用代码,仅在构建阶段编译为字节码 COPY . . -RUN python -m compileall -b /app && \ - find /app -type f -name '*.py' -delete && \ - find /app -type d -name '__pycache__' -prune -exec rm -rf {} + +RUN python -m compileall -b -x '(/projects/|/skills/)' /app && \ + find /app -not -path '/app/projects/*' -not -path '/app/skills/*' -type f -name '*.py' -delete && \ + find /app -not -path '/app/projects/*' -not -path '/app/skills/*' -type d -name '__pycache__' -prune -exec rm -rf {} + FROM base AS runtime