Skip to content

Commit 103db71

Browse files
committed
Update Dockerfile
1 parent 9fb463c commit 103db71

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

Dockerfile

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,23 @@ FROM python:3.11-slim-bookworm
22

33
WORKDIR /app
44

5-
# 复制源代码
5+
# Install system deps (minimal)
6+
RUN apt-get update && apt-get install -y --no-install-recommends \
7+
curl \
8+
&& rm -rf /var/lib/apt/lists/*
9+
10+
# Install uv
11+
RUN pip install --no-cache-dir uv
12+
13+
# Copy dependency files first (better cache)
14+
COPY pyproject.toml uv.lock* ./
15+
16+
# Install dependencies
17+
RUN uv install --system --no-cache-dir
18+
19+
# Copy app code
620
COPY . .
7-
uv install --no-cache-dir .
821

9-
# 暴露端口
1022
EXPOSE 8000
1123

12-
# 启动命令
1324
CMD ["python", "tests/mock_server.py"]

0 commit comments

Comments
 (0)