From fea420a87ba166b6696dc175d301fbe08180315f Mon Sep 17 00:00:00 2001 From: Louis Aussedat Date: Mon, 13 Jan 2025 14:02:11 +0100 Subject: [PATCH] docker: add pyqt5 dependency --- Dockerfile | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1ab457b5..058cfc61 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ # # Building the Speculos environment -FROM ghcr.io/ledgerhq/speculos-builder:latest AS builder +FROM ghcr.io/ledgerhq/speculos-builder:latest AS builder-app ADD . /speculos WORKDIR /speculos/ @@ -12,6 +12,19 @@ WORKDIR /speculos/ RUN cmake -Bbuild -H. -DPRECOMPILED_DEPENDENCIES_DIR=/install -DWITH_VNC=1 RUN make -C build +FROM docker.io/library/python:3.9-slim AS builder-pyqt5 + +RUN apt-get update && apt-get install -qy --no-install-recommends \ + qt5-qmake \ + build-essential \ + qtbase5-dev + +RUN python -m pip install \ + --no-cache-dir \ + --config-settings \ + --confirm-license= \ + --verbose \ + pyqt5 # Preparing final image FROM docker.io/library/python:3.9-slim @@ -20,18 +33,20 @@ ADD . /speculos WORKDIR /speculos # Copying artifacts from previous build -COPY --from=builder /speculos/speculos/resources/ /speculos/speculos/resources/ +COPY --from=builder-app /speculos/speculos/resources/ /speculos/speculos/resources/ +COPY --from=builder-pyqt5 /usr/local/lib/python3.9/site-packages/ /usr/local/lib/python3.9/site-packages/ RUN pip install --upgrade pip pipenv RUN pipenv install --deploy --system - RUN apt-get update && apt-get install -qy \ qemu-user-static \ libvncserver-dev \ gdb-multiarch \ binutils-arm-none-eabi \ - && apt-get clean + libqt5widgets5 \ + libqt5gui5 \ + libqt5core5a RUN apt-get clean && rm -rf /var/lib/apt/lists/