question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docker + .NET Core 2.0 + Https Images

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

7reactions
jinhduongcommented, Sep 7, 2018

@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"]
0reactions
irfanfarmakucommented, Jul 1, 2020

@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

Read more comments on GitHub >

github_iconTop Results From Across the Web

.NET by Microsoft | Docker Hub
Official images for .NET and ASP.NET Core.
Read more >
ASP.NET Core Runtime by Microsoft
This image contains the ASP.NET Core and .NET runtimes and libraries and is optimized for running ASP.NET Core apps in production. Composite container...
Read more >
NET SDK by Microsoft
This image contains the .NET SDK which is comprised of three parts: .NET CLI .NET runtime; ASP.NET Core. Use this image for your...
Read more >
Docker images for ASP.NET Core
Learn how to use the published ASP.NET Core Docker images from the Docker Registry. Pull and build your own images.
Read more >
Official .NET Docker images
NET Docker images are Docker images created and optimized by Microsoft. They're publicly available on Microsoft Artifact Registry.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found