When I try to run the java swing image getting the "Headless Exception error"
DockerFile:
FROM openjdk:8
COPY requiredlibararies requiredlibraries
COPY myjar.jar myjar.jar CMD ["java", "-Djava.awt.headless=true", "-jar", "myjar.jar"]
The container has to interact with the Mouse Keyboard and display of the your host machine to execute the GUI. Installed X11 server on the host machine and then communicated the container with the x11 server of my host machine.