mirror of
https://github.com/wahyd4/links.git
synced 2026-08-08 21:04:53 +10:00
27 lines
544 B
Docker
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 . .
|