Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

194
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda