Docker Community Forums

Share and learn in the Docker community.

Run GUI into Docker Windows

docker

(Orlandocorrea) #1

I have been trying for days to run an application inside the docker windows container, the application runs on windows systems, I am using the microsoft windows server core image and executing the java application on that image, I export the display by means of an environment variable . When I execute the command “java -jar aplicacion.jar”, it just sticks and does not show me the graphical interface of the application. Could someone please help me by telling me what I’m doing wrong? or if you can not do what I want? . I’m pretty new to docker and I can not find the error. Perform the tests on a ubuntu image and it works perfectly, but the application that I want to execute is necessary to be on a windows image.

I am infinitely grateful for the help!

This is my Dockerfile file:

FROM microsoft/windowsservercore:ltsc2016
CMD [“cmd”]
ENV DISPLAY=172.31.80.1:0.0
WORKDIR /api_container
COPY ./PlatinGUI750Windows_1.JAR /api_container
RUN @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command “iex ((New-Object System.Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1’))” && SET “PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin”
RUN choco install jdk8
RUN java -jar /api_container/PlatinGUI750Windows_1.JAR