# Pull base image FROM python:3.10.12-alpine # Set environment variables ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONUNBUFFERED 1 # Set work directory WORKDIR /app # Install system dependencies RUN apk update && apk add --no-cache gcc musl-dev python3-dev libffi-dev openssl-dev cargo netcat-openbsd # Install python dependencies COPY ./requirements/base.txt ./requirements/base.txt RUN pip install --upgrade pip RUN pip install "cython<3.0.0" && pip install --no-build-isolation pyyaml==6.0 RUN pip install -r requirements/base.txt # Copy project COPY . . # command to run on container start CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]