I’m attempting to shrink some windows containers by moving from core to nano, but I’m having issues installing Java into a nano container. Has anyone pulled this off?
running the jre installer simply silently exists with no work being done. however, the same command in servercore works perfectly. From my buildprofile:
RUN powershell start-process -filepath C:\install\jre.exe -passthru -wait -argumentlist "/s,INSTALLDIR=c:\java,/L,install64.log"
again, awesome in core, no fly zone in nano (command is slightly different as there’s no powershell, but still). So I went with a multi-stage build where I installed java onto server core then copied the folder (in this case C:\java) into nano and set the environment variables. This appears to work … but the various war files don’t all run successfully. example, with the jenkins war …
- the first-time login wizard starts (good!), but it doesn’t think it’s online so I can’t download starting packages.
- when the wizard is finished the screen blanks and it never goes to the home page.
I figure step 1 in torubleshooting this is to ensure java is installed and healthy on nano … but I’ve not figured out how to pull that off yet.
Anyone know of a DockerFile that does this? Optionally, anyone know an easy way to test java to ensure it’s healthy?