Files
SemapForm/Dockerfile

27 lines
676 B
Docker

# syntax=docker/dockerfile:1
FROM python:3.13-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1
# Install minimal OS dependencies (include zlib for arm/v7 builds)
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
zlib1g ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy dependency list and install first (leverages Docker layer cache)
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY app ./app
EXPOSE 8000
# Run the FastAPI app with Uvicorn
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]