| |
| FROM python:3.11-slim |
|
|
| |
| ENV PYTHONDONTWRITEBYTECODE 1 |
| ENV PYTHONUNBUFFERED 1 |
|
|
| |
| WORKDIR /app |
|
|
| |
| RUN apt-get update \ |
| && apt-get install -y --no-install-recommends \ |
| build-essential \ |
| gcc \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| COPY requirements*.txt ./ |
|
|
| |
| RUN pip install --upgrade pip |
| RUN pip install -r requirements.txt |
|
|
| |
| COPY . . |
|
|
| |
| RUN chmod +x start.sh |
|
|
| |
| EXPOSE 8000 |
|
|
| |
| COPY docker-entrypoint.sh /usr/local/bin/ |
| RUN chmod +x /usr/local/bin/docker-entrypoint.sh |
|
|
| |
| ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] |
| CMD ["python", "main.py"] |