-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.base
More file actions
27 lines (21 loc) · 794 Bytes
/
Dockerfile.base
File metadata and controls
27 lines (21 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Shared base image for all backend services
# Contains: Python, system deps, uv, and all Python dependencies
FROM python:3.12-slim
WORKDIR /app
# Install all system dependencies needed by any service
RUN apt-get update && apt-get install -y \
gcc \
curl \
libsnappy-dev \
liblzma-dev \
&& rm -rf /var/lib/apt/lists/*
# Install uv (using Docker Hub mirror - ghcr.io has rate limiting issues)
COPY --from=astral/uv:latest /uv /uvx /bin/
# Copy dependency files
COPY pyproject.toml uv.lock ./
# Install Python dependencies (production only)
RUN uv sync --locked --no-dev --no-install-project
# Set paths: PYTHONPATH for imports, PATH for venv binaries (no uv run needed at runtime)
ENV PYTHONPATH=/app
ENV PATH="/app/.venv/bin:$PATH"
ENV KUBECONFIG=/app/kubeconfig.yaml