I have the setup below:
- Windows Host
- Oracle Ent Linux 8 Guest OS managed with Virtual Box
- Docker Container (with gui application) running in Guest OS
I have a requirement to access the gui of the container application from within the guest OS.
Docker run command -
docker run --name guiapp -it --network=myguestnetwork --env DISPLAY=guestos.hostname:0.0 guiappimage
Exception in thread "main" java.awt.AWTError: Can't connect to X11 window server using 'guestos.hostname:0.0' as the value of the DISPLAY variable. ..{java stackstrace}
Within my dockerfile which I used to build my container I have the following commands
USER root
RUN dnf config-manager --enable ol8_codeready_builder
RUN yum install -y hostname xorg-x11-apps
All searches for similar usecases doesn’t seem to apply as it seems to come from the angle that the host os will be used to access the gui of the dockerized application.
note: I am using this approach as I have limited control on my host os and the development VM gives me more control on what to install and configure.
kindly assist.