Files
bdbot/Dockerfile
2026-01-28 15:35:07 +03:00

35 lines
667 B
Docker

# Dockerfile for backend development
FROM python:3.12-slim as base
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
# Set uv link mode to copy (for Docker volumes)
ENV UV_LINK_MODE=copy
# Development stage
FROM base as development
# Copy dependency files
COPY pyproject.toml uv.lock ./
# Install dependencies
RUN uv sync --frozen
# Copy application code
COPY . .
# Default command (can be overridden in docker compose)
CMD ["uv", "run", "/app/bot.py"]