Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
FROM python:latest
FROM python:3.10-slim AS build

WORKDIR /claude-code-proxy
WORKDIR /app
RUN pip install --no-cache-dir uv==0.4.30

# Copy package specifications
COPY pyproject.toml uv.lock ./
ENV UV_PYTHON_PREFERENCE=only-system \
UV_PYTHON_DOWNLOADS=never

# Install uv and project dependencies
RUN pip install --upgrade uv && uv sync --locked
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-install-project --no-dev

# Copy project code to current directory
COPY . .
RUN uv sync --frozen --no-dev


FROM python:3.10-slim

WORKDIR /app
COPY --from=build /app /app
ENV PATH=/app/.venv/bin:$PATH

# Start the proxy
EXPOSE 8082
CMD uv run uvicorn server:app --host 0.0.0.0 --port 8082 --reload
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "8082"]