|
FROM python:3.9 |
|
|
|
WORKDIR /app |
|
|
|
COPY . . |
|
|
|
RUN --mount=target=/tmp/packages.txt,source=packages.txt apt-get update && xargs -r -a /tmp/packages.txt apt-get install -y && apt-get install -y curl && curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y nodejs && rm -rf /var/lib/apt/lists/* && apt-get clean |
|
RUN ln -s /usr/lib/python3/dist-packages/uno.py /usr/local/lib/python3.9/site-packages/ |
|
RUN ln -s /usr/lib/python3/dist-packages/unohelper.py /usr/local/lib/python3.9/site-packages/ |
|
|
|
|
|
RUN pip install --no-cache-dir --upgrade -r /app/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 |
|
|
|
|
|
CMD ["python","app.py"] |