Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QPDF Installation on Docker #41

Open
chaimtevel opened this issue Dec 8, 2024 · 3 comments
Open

QPDF Installation on Docker #41

chaimtevel opened this issue Dec 8, 2024 · 3 comments

Comments

@chaimtevel
Copy link

Hi,

I was very excited to try out the new features outlined here.

Upgrading to the latest (as of now) nuget package did allow us to get these new features up and running easily on our local dev machines. However, once we deployed to our staging server which runs on docker, we did have issues with missing dependencies so I'm sharing what we did to get this working.

We used the following base image for the runtime (not the build) image.

FROM mcr.microsoft.com/dotnet/aspnet:8.0-noble AS base

We also needed to install the following packages on the runtime image, but we did not spend too much time seeing how to minimize what's being installed.

RUN apt-get update && apt-get install -y qpdf && \
    apt-get clean && \ 
    rm -rf /var/lib/apt/lists/*

The first line of this snippet installs the qpdf and its dependencies binaries in the image. The next two lines just cleanup the apt-get disk usage to minimize the image size.

Thanks!

@MarcinZiabek
Copy link
Member

The library should provide you with a detailed list of dependencies to install. I will investigate why it did not happen.

For linux: apt install openssl-bin gnutls-bin libjpeg-dev
For linux musl: apk add openssl gnutls libjpeg-turbo

Please also ensure that the OpenSSL library is installed on your system with a version at least 3.0.0.

Could you please try the above and let me know if it fixes the problem? Please do NOT install the qpdf package.

@chaimtevel
Copy link
Author

I was able to test quickly in my test project and I can confirm that running the following does resolve this issue as well.

RUN apt-get update && apt-get install -y openssl gnutls-bin libjpeg-dev && \
    apt-get clean && \ 
    rm -rf /var/lib/apt/lists/*

I'll just note that I had to change the openssl-bin package to the openssl package as I got a error Unable to locate package openssl-bin. I did not research this as I'm just trying to get this working quickly.

Thanks for the direction!

@chaimtevel
Copy link
Author

I also looked at the openssl version after running a container based on the above images the version is OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024).

Just mentioning again that the base image is the ubuntu based mcr.microsoft.com/dotnet/aspnet:8.0-noble image. See here

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

No branches or pull requests

2 participants