|
|
|
|
|
|
|
FROM python:3.12 |
|
|
|
WORKDIR /code |
|
|
|
COPY ./requirements.txt /code/requirements.txt |
|
|
|
RUN apt-get -y update && apt-get -y install lsb-release software-properties-common gnupg && apt-get -y clean all |
|
|
|
RUN bash -c "$(wget -O - https://apt.llvm.org/llvm.sh) || exit 1" |
|
|
|
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt |
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
|
|
USER user |
|
|
|
|
|
ENV HOME=/home/user \ |
|
PATH=/home/user/.local/bin:$PATH |
|
|
|
|
|
WORKDIR $HOME/app |
|
|
|
|
|
COPY --chown=user . $HOME/app |
|
|
|
|
|
ENV PYTHONUNBUFFERED=1 |
|
|
|
CMD ["python", "main.py"] |