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

Docker + .NET Core 2.0 + Https Images #34

Closed
mike-dube opened this issue Apr 1, 2018 · 6 comments
Closed

Docker + .NET Core 2.0 + Https Images #34

mike-dube opened this issue Apr 1, 2018 · 6 comments

Comments

@mike-dube
Copy link

mike-dube commented Apr 1, 2018

I'm currently running DinkToPdf on my macOS without any problem.

My webpages use external HTTPS ressources such as

  • two images
  • 1 CSS file

In Docker, using a asp-net-2.0 base image (along with added-dependencies

apt-get install -y --no-install-recommends zlib1g fontconfig libfreetype6 libx11-6 libxext6 libxrender1

For some reason, the PDF rendered has no image, and no CSS.

How can I fix this?

@mike-dube
Copy link
Author

Docker reports

QSslSocket: cannot resolve CRYPTO_num_locks QSslSocket: cannot resolve CRYPTO_set_id_callback QSslSocket: cannot resolve CRYPTO_set_locking_callback QSslSocket: cannot resolve sk_free QSslSocket: cannot resolve sk_num QSslSocket: cannot resolve sk_pop_free QSslSocket: cannot resolve sk_value QSslSocket: cannot resolve SSL_library_init QSslSocket: cannot resolve SSL_load_error_strings QSslSocket: cannot resolve SSLv3_client_method QSslSocket: cannot resolve SSLv23_client_method QSslSocket: cannot resolve SSLv3_server_method QSslSocket: cannot resolve SSLv23_server_method QSslSocket: cannot resolve X509_STORE_CTX_get_chain QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf QSslSocket: cannot resolve SSLeay QSslSocket: cannot call unresolved function CRYPTO_num_locks QSslSocket: cannot call unresolved function CRYPTO_set_id_callback QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback QSslSocket: cannot call unresolved function SSL_library_init QSslSocket: cannot call unresolved function SSLv23_client_method QSslSocket: cannot call unresolved function sk_num QSslSocket: cannot call unresolved function SSLv23_client_method QSslSocket: cannot call unresolved function SSL_library_init QSslSocket: cannot call unresolved function SSLv23_client_method QSslSocket: cannot call unresolved function SSL_library_init QSslSocket: cannot call unresolved function SSLv23_client_method QSslSocket: cannot call unresolved function SSL_library_init QSslSocket: cannot call unresolved function SSLv23_client_method QSslSocket: cannot call unresolved function SSL_library_init

@jinhduong
Copy link

Hi @Dekim,
I also faced this problem after I upgrade my aspnetcore image from 1.1 to 2.0, how did you resolve this problem? thanks

@mike-dube
Copy link
Author

mike-dube commented Sep 6, 2018

@jinhduong Sadly it's not an issue with this project but with the lib wktopdf.

It does not support TLS 2.0, so it's impossible to load ressource in https. I had to use base64 image.

@jinhduong
Copy link

@Dekim Thanks for your response, I found out the solution for aspnetcore2.0 image and it worked. If you still would like to use external https resources, you can try:

FROM microsoft/aspnetcore:2.0 AS base
RUN ["apt-get", "update"]
RUN ["apt-get", "-y", "install", "libgdiplus"]
RUN ["apt-get", "-y", "install", "xvfb", "libfontconfig", "wkhtmltopdf"]
RUN ["apt-get", "-y", "install", "libc6-dev"]
RUN ["apt-get", "-y", "install", "openssl"]
RUN ["apt-get", "-y", "install", "libssl1.0-dev"]

@mike-dube
Copy link
Author

@jinhduong Thanks! Awesome work!

@irfanfarmaku
Copy link

@Dekim Thanks for your response, I found out the solution for aspnetcore2.0 image and it worked. If you still would like to use external https resources, you can try:

FROM microsoft/aspnetcore:2.0 AS base
RUN ["apt-get", "update"]
RUN ["apt-get", "-y", "install", "libgdiplus"]
RUN ["apt-get", "-y", "install", "xvfb", "libfontconfig", "wkhtmltopdf"]
RUN ["apt-get", "-y", "install", "libc6-dev"]
RUN ["apt-get", "-y", "install", "openssl"]
RUN ["apt-get", "-y", "install", "libssl1.0-dev"]

awesome, this is working on .net core 3.0 too

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

3 participants