Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 5, 2026

The wkhtmltopdf package requires libssl1.1, which is unavailable in Ubuntu Noble 24.04+ (uses libssl3), causing Docker builds to fail with dependency errors.

Changes

  • .docker/workspace/Dockerfile: Wrap wkhtmltopdf installation in error handler to allow build continuation on failure

    && (wget "..." \
    && dpkg -i "..." \
    && apt -f install) || echo "wkhtmltopdf installation failed, continuing..."
  • CI workflows: Disable wkhtmltopdf installation in docker-build-test.yml and test-containers.yml to prevent CI failures

    sed -i "s/WORKSPACE_INSTALL_WKHTMLTOPDF=true/WORKSPACE_INSTALL_WKHTMLTOPDF=false/" .env.docker

Users can still enable wkhtmltopdf manually, but builds no longer fail when dependencies are unavailable.

Original prompt

Dockerfile:610

609 |
610 | >>> RUN if [ ${INSTALL_WKHTMLTOPDF} = true ]; then
611 | >>> ARCH=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/)
612 | >>> && apt-get install -y
613 | >>> libxrender1
614 | >>> libfontconfig1
615 | >>> libx11-dev
616 | >>> libjpeg62
617 | >>> libxtst6
618 | >>> fontconfig
619 | >>> libjpeg-turbo8-dev
620 | >>> xfonts-base
621 | >>> xfonts-75dpi
622 | >>> wget
623 | >>> && wget "https://github.com/wkhtmltopdf/packaging/releases/download/${WKHTMLTOPDF_VERSION}/wkhtmltox_${WKHTMLTOPDF_VERSION}.focal_${ARCH}.deb"
624 | >>> && dpkg -i "wkhtmltox_${WKHTMLTOPDF_VERSION}.focal_${ARCH}.deb"
625 | >>> && apt -f install
626 | >>> ;fi
627 |

target workspace: failed to solve: process "/bin/sh -c if [ ${INSTALL_WKHTMLTOPDF} = true ]; then ARCH=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && apt-get install -y libxrender1 libfontconfig1 libx11-dev libjpeg62 libxtst6 fontconfig libjpeg-turbo8-dev xfonts-base xfonts-75dpi wget && wget "https://github.com/wkhtmltopdf/packaging/releases/download/${WKHTMLTOPDF_VERSION}/wkhtmltox_${WKHTMLTOPDF_VERSION}.focal_${ARCH}.deb\" && dpkg -i "wkhtmltox_${WKHTMLTOPDF_VERSION}.focal_${ARCH}.deb" && apt -f install ;fi" did not complete successfully: exit code: 1

[workspace 48/59] RUN if [ true = true ]; then ARCH=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && apt-get install -y libxrender1 libfontconfig1 libx11-dev libjpeg62 libxtst6 fontconfig libjpeg-turbo8-dev xfonts-base xfonts-75dpi wget && wget "https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_${ARCH}.deb" && dpkg -i "wkhtmltox_0.12.6-1.focal_${ARCH}.deb" && apt -f install ;fi:
6.055 Unpacking wkhtmltox (1:0.12.6-1.focal) ...
7.266 dpkg: dependency problems prevent configuration of wkhtmltox:
7.266 wkhtmltox depends on libssl1.1; however:
7.266 Package libssl1.1 is not installed.
7.266
7.266 dpkg: error processing package wkhtmltox (--install):
7.266 dependency problems - leaving unconfigured
7.266 Processing triggers for man-db (2.12.0-4build2) ...
7.298 Errors were encountered while processing:
7.298 wkhtmltox


Error: Process completed with exit code 1. same problem as before... do the try/catch and the sed to eliminate wkhtmltopdf


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@coderabbitai
Copy link

coderabbitai bot commented Jan 5, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI changed the title [WIP] Fix Dockerfile issue with installing wkhtmltopdf Fix wkhtmltopdf build failure with graceful degradation Jan 5, 2026
Copilot AI requested a review from nielsdrost7 January 5, 2026 08:46
Copy link
Contributor

@nielsdrost7 nielsdrost7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot why can't wkhtmltopdf require libssl3 (?)
Is wkhtmltopdf required to run snappy PDF in Laravel

Copy link
Contributor Author

Copilot AI commented Jan 5, 2026

@copilot why can't wkhtmltopdf require libssl3 (?)
Is wkhtmltopdf required to run snappy PDF in Laravel

Why wkhtmltopdf can't use libssl3:
wkhtmltopdf 0.12.6-1 was built in 2020 against libssl1.1 (Ubuntu 20.04 Focal). The project has been largely inactive since then with no official builds for libssl3. New packages would need to be compiled from source against libssl3.

Is wkhtmltopdf required for Laravel Snappy:
Yes, Laravel Snappy is a wrapper around wkhtmltopdf for PDF generation. However, this Docker setup is general-purpose and wkhtmltopdf is optional (disabled by default). Applications that don't use Snappy/wkhtmltopdf can run without it.

The fix allows builds to continue when wkhtmltopdf installation fails, and disables it in CI where it's not needed for testing the Docker images themselves.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/wkhtmltopdf/packaging/releases
    • Triggering command: /usr/bin/curl curl -sL REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copy link
Contributor

@nielsdrost7 nielsdrost7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot a fun and tough question:
I'm building InvoicePlane v2 with a report builder that Constructs a file to create a PDF from for Reports and Invoices.
I need and want the best solution.
My belief was that it would have been Snappy, although no wonder that Snappy is a wrapper around wkhtmltopdf.

In InvoicePlane v1 we're using mpdf.
I don't mind supplying both, I just don't want any more failing Docker builds

Copy link
Contributor

@nielsdrost7 nielsdrost7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot a fun and tough question:
I'm building InvoicePlane v2 with a report builder that Constructs a file to create a PDF from for Reports and Invoices.
I need and want the best solution.
My belief was that it would have been Snappy, although no wonder that Snappy is a wrapper around wkhtmltopdf.

In InvoicePlane v1 we're using mpdf.
I don't mind supplying both, I just don't want any more failing Docker builds

Copy link
Contributor Author

Copilot AI commented Jan 5, 2026

@copilot a fun and tough question:
I'm building InvoicePlane v2 with a report builder that Constructs a file to create a PDF from for Reports and Invoices.
I need and want the best solution.
...

For PDF generation in InvoicePlane v2, you have solid options:

mpdf (pure PHP):

  • No system dependencies, always works
  • Good for most invoice/report needs
  • Current InvoicePlane v1 solution

Snappy/wkhtmltopdf:

  • Better rendering for complex HTML/CSS
  • System dependency (the Docker build issue)
  • My fix makes it optional—builds succeed even if wkhtmltopdf fails

Recommendation: Start with mpdf (reliable, no build failures). Add wkhtmltopdf as an optional enhancement later if needed. The Docker setup now supports both—wkhtmltopdf won't break builds anymore, and mpdf requires no additional setup.

Your builds are safe either way with the current fix.

Copilot AI requested a review from nielsdrost7 January 5, 2026 10:40
@nielsdrost7 nielsdrost7 marked this pull request as ready for review January 5, 2026 10:59
@nielsdrost7 nielsdrost7 merged commit 0ac7ebd into develop Jan 5, 2026
4 checks passed
@nielsdrost7 nielsdrost7 deleted the copilot/fix-dockerfile-install-error branch January 5, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants