Using VNC with Docker
Maybe this thread about running GUI applications in docker might help you out? It should be possible and the top answer shows how it should be done.
Alternatively there is this tutorial which seems to do the same thing, but is explained a little more in depth.
Andrew Shen
Updated on June 04, 2022Comments
-
Andrew Shen almost 2 years
this is my first time using VNC and docker. I want to connect to my docker's GUI.
I have tried to follow a few tutorials online but my VNC viewer cannot connect to the display. I have exposed port 5900 in my dockerfile, and inside docker I have ran
Xvbf :1 -screen 0 1600x1200x16 & export DISPLAY=:1
andx11vnc
. It seems to work and I get message saying that the desktop is at port 5900. However I still cannot connect to localhost:5900 in my vnc viewer.What am I doing wrong, and what can I use to diagnose my problem? Thanks!
-
Paolo almost 4 yearsDid you bind the port when launching the container (
-p
) ? -
David Maze almost 4 yearsContainers don't typically run interactive desktop applications. If you start running a VNC server, and a GNOME login, and a full desktop environment, you're stepping a little outside the "lightweight packaging around a single process" model, and a full VM running a standard desktop OS might be a better match.
-
Andrew Shen almost 4 yearsI have used the -p option. As to the other comment, yes I should probably look to a VM, but I did not write the docker image and are afraid of messing up some system dependencies.
-
StayOnTarget almost 3 yearsI’m voting to close this question because it has nothing to do with programming
-