X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/c6e88b6ffcb8aef6d291b050454f311248184bad..4cc06fc092836d96eb52ac12c691f1baa41f04b3:/Dockerfile diff --git a/Dockerfile b/Dockerfile index f916be0b7..ed113fe3b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,24 +1,12 @@ -FROM python:3.8 AS base +FROM python:3.9-trixie AS base + +ARG UID=1000 +ARG GID=1000 RUN apt-get update && apt-get install -y \ git \ calibre \ texlive-xetex texlive-lang-polish \ - libespeak-dev - -COPY requirements/requirements.txt requirements.txt - -# numpy -> aeneas -RUN pip install numpy -RUN pip install aeneas - -RUN pip install --no-cache-dir -r requirements.txt -RUN pip install --no-cache-dir \ - psycopg2-binary \ - django-debug-toolbar==3.2.2 \ - python-bidi - -RUN apt-get install -y \ texlive-extra-utils \ texlive-lang-greek \ texlive-lang-other \ @@ -28,12 +16,26 @@ RUN apt-get install -y \ fonts-noto-core fonts-noto-extra +COPY requirements/requirements.txt requirements.txt + +RUN pip install --no-cache-dir -r requirements.txt +RUN pip install --no-cache-dir \ + psycopg2-binary \ + django-debug-toolbar==3.2.2 + +RUN addgroup --gid $GID app && \ + adduser --gid $GID --home /app --uid $UID app + + # fonts -RUN cp -a /usr/local/lib/python*/site-packages/librarian/fonts /usr/local/share/fonts +RUN cp -a /usr/local/lib/python*/site-packages/librarian/fonts /usr/share/fonts RUN fc-cache +USER app + WORKDIR /app/src +RUN mkdir /app/.ipython FROM base AS dev