字节码不编译/skills /projects/
This commit is contained in:
parent
a9227b8046
commit
18e9200be2
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user