Skip to content

Commit

Permalink
Split these layers up
Browse files Browse the repository at this point in the history
Currently it's creating a 2.5GB layer, which takes ages to download
and extract. Also Chrome updates much more regularly than the other
packages.
  • Loading branch information
marksteward committed Jul 26, 2024
1 parent 662a5fe commit f59dfb0
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions docker/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ COPY pyproject.toml poetry.lock /app/
# doesn't confuse poetry.
ENV POETRY_VIRTUALENVS_IN_PROJECT=false

# All the X11 packages are required for chromium/playwright which we use for
# generating PDFs.
#
# It would be nice to be able to build an image without build tools and dev
# packages, however this complicates upgrading packages which require compilation.
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libxml2-dev libxslt1-dev libffi-dev git glpk-utils \
postgresql-client make build-essential libpq-dev \
libx11-xcb1 libxcomposite1 libxss1 \
libxcursor1 libxdamage1 libxi6 libxtst6 libnss3 libcups2 \
libxrandr2 libasound2 libatk1.0-0 libatk-bridge2.0-0 libgtk-3-0 libzbar0 \
coinor-cbc curl && \
pip3 install poetry==1.7.1 && \
poetry install && \
poetry run playwright install-deps && \
poetry run playwright install chromium && \
libzbar0 coinor-cbc curl && \
rm -rf /var/lib/apt/lists/*

RUN pip3 install poetry==1.7.1 && \
poetry install

RUN poetry run playwright install-deps && \
rm -rf /var/lib/apt/lists/*

RUN poetry run playwright install chromium && \
rm -rf /var/lib/apt/lists/*

0 comments on commit f59dfb0

Please sign in to comment.