Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

192
Views
Running a Java war file deployed on Tomcat over Windows server 2016 Docker container

Trying to run a Java .war file with Docker on Windows server 2016.

With Linux container it can be done by pulling Tomcat image (which is built on top of openJDK and uses Debian as a base image) and adding war file to webapps folder through Dockerfile.

But, Tomcat do not currently has any image for Windows containers, since openJDK too doesn't have support for Microsoft/windowsservercore or Microsoft/nanoserver

In my view, to be able to run war on Tomcat for windows We will need:

  • windowsservercore
  • JDK:JRE installation on top of windowsservercore
  • Tomcat installation with Environment Vars of installed JDK.

To create the final image JDK is downloaded and installed through PS :

The Dockerfile looks like:

FROM windowsservercore

RUN powershell (new-object System.Net.WebClient).Downloadfile('http://javadl.oracle.com/webapps/download/Au toDL?BundleId=210185', 'C:\jre-8u91-windows-x64.exe')
RUN powershell start-process -filepath C:\jre-8u91-windows-x64.exe -passthru  -wait -argumentlist "/s,INSTALLDIR=c:\Java\jre1.8.0_91,/L,install64.log"
RUN del C:\jre-8u91-windows-x64.exe

CMD [ "c:\\Java\\jre1.8.0_91\\bin\\java.exe", "-version"]

But I am not sure how to install Tomcat with Environment variables set and then adding war to the webapps Directory.

Heard about WinDocks, but I would like to build without it.

Anyone has some insights on this?

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!