Files
links/Dockerfile
T
2024-11-04 17:26:58 +11:00

27 lines
544 B
Docker

FROM python:3.12-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set work directory
WORKDIR /app
# Copy pyproject.toml
COPY pyproject.toml uv.lock ./
# Install system dependencies and uv
RUN apt-get update && apt-get install -y \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/* \
&& curl -LsSf https://astral.sh/uv/install.sh | sh \
&& . $HOME/.cargo/env \
&& which uv
# Install Python dependencies
RUN . $HOME/.cargo/env && uv sync --no-dev
# Copy project
COPY . .