From 76c4b65391f3f19b9380f35d08fe68c2d7c85ba2 Mon Sep 17 00:00:00 2001 From: Ali Akhmad Firuz Akhmad Date: Sat, 25 Jul 2026 07:44:53 -0700 Subject: [PATCH 1/2] Drop xvfb-run wrapper, no longer needed since LibrePCB 2.2.0 librepcb-cli now runs headlessly on its own (LibrePCB/LibrePCB#1793), so the xvfb-run wrapper and the xvfb package are no longer needed. Not bumping LIBREPCB_VERSION here since 2.2.0 hasn't been released yet, the build-time version check further down would fail against 2.1.1, which doesn't have the headless fix. Opening as a draft until that's actually available. --- Dockerfile | 4 ++-- librepcb-cli | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index afbfe4f..297fabd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ ENV LANG=C.UTF-8 # users to have it installed (to clone/push/diff projects or libraries). ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update -q && apt-get -y -q install --no-install-recommends \ - ca-certificates git libegl1 libfontconfig1 libglib2.0-0 libglu1-mesa wget xvfb \ + ca-certificates git libegl1 libfontconfig1 libglib2.0-0 libglu1-mesa wget \ && rm -rf /var/lib/apt/lists/* # Install LibrePCB CLI @@ -26,7 +26,7 @@ RUN wget "https://download.librepcb.org/releases/$LIBREPCB_VERSION/librepcb-$LIB # directory when mounting a volume to this path WORKDIR /work -# Add wrapper around librepcb-cli to get it run with xvfb-run +# Add wrapper around librepcb-cli ADD librepcb-cli /usr/local/bin/librepcb-cli # Check if the librepcb-cli works as expected diff --git a/librepcb-cli b/librepcb-cli index 3722d57..3ec65cf 100755 --- a/librepcb-cli +++ b/librepcb-cli @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# LibrePCB CLI requires a running X server, as explained in documentation: -# https://docs.librepcb.org/#cli-headless -xvfb-run -a /opt/librepcb/bin/librepcb-cli "$@" +# Since LibrePCB 2.2.0, librepcb-cli runs headlessly on its own, so no +# X server / xvfb-run wrapper is needed anymore. +exec /opt/librepcb/bin/librepcb-cli "$@" \ No newline at end of file From 6e07f35086fe076e6fa7df1c3ad204ec611bc4da Mon Sep 17 00:00:00 2001 From: Ali Akhmad Firuz Akhmad Date: Sun, 26 Jul 2026 09:22:50 -0700 Subject: [PATCH 2/2] Remove wrapper script, install librepcb-cli directly to /usr/local The wrapper had no function anymore after dropping xvfb-run, so remove it entirely and just symlink librepcb-cli into /usr/local/bin instead. Keeping the actual install tree at /opt/librepcb rather than extracting straight into /usr/local, since Qt resolves plugin paths relative to that layout. --- Dockerfile | 6 ++---- librepcb-cli | 5 ----- 2 files changed, 2 insertions(+), 9 deletions(-) delete mode 100755 librepcb-cli diff --git a/Dockerfile b/Dockerfile index 297fabd..6b722e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,15 +20,13 @@ RUN wget "https://download.librepcb.org/releases/$LIBREPCB_VERSION/librepcb-$LIB && mkdir /opt/librepcb \ && tar -xvzf librepcb-$LIBREPCB_VERSION-linux-x86_64.tar.gz -C /opt/librepcb --strip-components=1 \ && rm librepcb-$LIBREPCB_VERSION-linux-x86_64.tar.gz \ - && rm /opt/librepcb/bin/librepcb + && rm /opt/librepcb/bin/librepcb \ + && ln -s /opt/librepcb/bin/librepcb-cli /usr/local/bin/librepcb-cli # Set working directory to /work so users don't have to change the working # directory when mounting a volume to this path WORKDIR /work -# Add wrapper around librepcb-cli -ADD librepcb-cli /usr/local/bin/librepcb-cli - # Check if the librepcb-cli works as expected RUN librepcb-cli --version diff --git a/librepcb-cli b/librepcb-cli deleted file mode 100755 index 3ec65cf..0000000 --- a/librepcb-cli +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -# Since LibrePCB 2.2.0, librepcb-cli runs headlessly on its own, so no -# X server / xvfb-run wrapper is needed anymore. -exec /opt/librepcb/bin/librepcb-cli "$@" \ No newline at end of file