CI: Fix multi stage builds (#190)

* Try fixing build error

* --upgrade instead of --update

* Attempt to fix timeout

* Try build qpdf on arm64

* Revert "Try build qpdf on arm64"

This reverts commit 42823a4d28.

* Format

* Try with libqpdf-dev install

* Move libqpdf-dev install to else

* Try with correct uname

* Run docker container to extract frontend

Co-authored-by: Johann Bauer <bauerj@bauerj.eu>
This commit is contained in:
Quinn Casey
2022-03-01 12:48:26 -08:00
committed by GitHub
parent ef94f974cd
commit 01d0d0e019
2 changed files with 7 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ FROM node:16 AS compile-frontend
COPY . /src
WORKDIR /src/src-ui
RUN npm install
RUN npm update npm -g && npm install
RUN ./node_modules/.bin/ng build --configuration production
@@ -74,7 +74,7 @@ RUN apt-get update \
git \
zlib1g-dev \
libjpeg62-turbo-dev \
&& if [ "$(uname -m)" = "armv7l" ]; \
&& if [ "$(uname -m)" = "armv7l" ] || [ "$(uname -m)" = "aarch64" ]; \
then echo "Building qpdf" \
&& mkdir -p /usr/src/qpdf \
&& cd /usr/src/qpdf \
@@ -88,8 +88,9 @@ RUN apt-get update \
else \
echo "Skipping qpdf build because pikepdf binary wheels are available."; \
fi \
&& python3 -m pip install --upgrade pip wheel \
&& python3 -m pip install --default-timeout=1000 --upgrade --no-cache-dir supervisor \
&& python3 -m pip install --default-timeout=1000 --no-cache-dir -r ../requirements.txt \
&& python3 -m pip install --default-timeout=1000 --no-cache-dir -r ../requirements.txt \
&& apt-get -y purge build-essential git zlib1g-dev libjpeg62-turbo-dev \
&& apt-get -y autoremove --purge \
&& rm -rf /var/lib/apt/lists/*
@@ -98,7 +99,7 @@ RUN apt-get update \
COPY docker/ ./docker/
RUN cd docker \
&& cp imagemagick-policy.xml /etc/ImageMagick-6/policy.xml \
&& cp imagemagick-policy.xml /etc/ImageMagick-6/policy.xml \
&& mkdir /var/log/supervisord /var/run/supervisord \
&& cp supervisord.conf /etc/supervisord.conf \
&& cp docker-entrypoint.sh /sbin/docker-entrypoint.sh \