You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN adduser --quiet --disabled-password qtuser && usermod -a -G video qtuser
RUN apt-get update -y \
&& apt-get install alsa -y \
&& apt-get install libnss3 -y \
&& apt-get install -y python3-pyqt5 \
&& apt-get install python3-pip -y \
&& pip3 install pyqtwebengine
# RUN apt-get install xauth -y
# RUN apt-get install xvfb -y
# RUN apt-get install x11vnc -y
# RUN mkdir ~/.vnc
# RUN x11vnc -storepasswd 1234 ~/.vnc/passwd
# Set display port and dbus env to avoid hanging
ENV DISPLAY=:99
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null
USER qtuser
ENV HOME /home/qtuser
WORKDIR /htmltopdf
whenever I run this image I'm getting below error
qt.qpa.xcb: could not connect to display :99
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
I want to run this without using host support only way to run above image is using below command
I have a Dockerfile like this
whenever I run this image I'm getting below error
I want to run this without using host support only way to run above image is using below command
docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -v $(pwd):/htmltopdf --device=/dev/dri:/dev/dri htmltopdf:latest python3 htmlToPdfnew.py --url https://www.w3schools.com/howto/howto_css_register_form.asp
Is it possible to run PyQT without using these ???
-v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY --device=/dev/dri:/dev/dri
I tried everything in internet
installed xvfb, xorg,vnc
still no luck
this is my python code
So how can I run above code without using these ??
-v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY --device=/dev/dri:/dev/dri
The text was updated successfully, but these errors were encountered: