I’m trying to perform HTML to PDF conversion with class library in Linux docker 3.1 using multithreading. The HTML converter has some dependency packages to be installed in the environment where the conversion takes place.
So, I tried to install the packages using dockerfile in Linux. But I am getting errors when trying to run the conversion in multithreading. Below are the commands, which I have used in my dockerfile.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base
RUN apt-get update && apt-get -y install xvfb && apt-get -y install fontconfig && apt-get -y install libx11-dev libx11-xcb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-render0-dev libxcb-shm0-dev libxcb-util0-dev libxcb-xfixes0-dev libxcb-xkb-dev libxcb1-dev libxfixes-dev libxrandr-dev libxrender-dev
WORKDIR /app
EXPOSE 80
EXPOSE 443
CMD [“sh”, “/app/product.sh”]
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Below is the exception message which i am getting from docker sample in multi threading.
No protocol specified
QXcbConnection: Could not connect to display :110
Aborted
I have tried using this below shell commands (product.sh) to resolve this exception,
#!/bin/bash
export DISPLAY=:0
xhost +local:docker
But still Im getting an same exception, Can someone help me to solve this exception in Linux docker using multithreading in VS2019.
Thanks in Advance,
Gowtham