This repository has been archived on 2023-08-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
2022-10-29 22:09:16 +00:00
|
|
|
FROM python:3.11-slim
|
2022-10-14 18:54:29 +03:00
|
|
|
|
|
|
|
|
# Keeps Python from generating .pyc files in the container
|
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
|
|
|
|
|
|
|
|
# Turns off buffering for easier container logging
|
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
|
|
2022-10-30 23:08:24 +03:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
# Creates new user
|
|
|
|
|
RUN adduser -u 1000 --disabled-password --gecos "" appuser && chown -R appuser /app
|
|
|
|
|
|
2022-10-14 18:54:29 +03:00
|
|
|
# Install deps
|
|
|
|
|
RUN apt update && apt full-upgrade -y
|
|
|
|
|
|
|
|
|
|
# Install pip requirements
|
2022-11-18 11:34:04 +00:00
|
|
|
RUN pip install -U pip setuptools wheel
|
2022-11-18 16:38:25 +00:00
|
|
|
COPY requirements.txt .
|
2022-11-18 11:34:04 +00:00
|
|
|
RUN pip install -r requirements.txt
|
2022-10-14 18:54:29 +03:00
|
|
|
|
|
|
|
|
COPY . /app
|
|
|
|
|
|
|
|
|
|
USER appuser
|
|
|
|
|
|
2022-10-29 22:09:16 +00:00
|
|
|
CMD ["python", "main.py"]
|