docker build -t tomcat-eb:v.9.0.17 .
docker run -it --rm -p 8888:8080 tomcat-eb:v.9.0.17
FROM tomee:8-jre-8.0.0-M2-webprofile
LABEL Author="Nome Cognome"
EXPOSE 8080
RUN rm -fr /usr/local/tomcat/webapps/ROOT
COPY ./esercitazione.1.maven.war /usr/local/tomcat/webapps/ROOT.war
CMD ["catalina.sh", "run"]
When I write the URL in the browser I get the home of tomcat. I read tomcat ee but I don’t know what it is.
Is there a ROOT folder like in tomcat? Where should I copy the .war?
I think I understand why tomcat doesn’t work.
The first mistake I made was code level, thanks to your help I solved it. I left feedback.
The second error is instead related to the configuration of Windows 10. I believe that Windows prevents the browser from accessing the container.
I tried this guide but I can’t solve it:
Today I tried again to test the WAR on different browsers. Everything is back to work. The only browser that does not work is EDGE. I believe that the problem is not Docker and neither is VirtualBox but the Microsoft browser. I will open a thread on the Microsoft site.
I close the discussion and write “solved” even if the problem has not been solved 100%.
Now that I’m learning to use Docker, I like it more and more and I’m sure it will be the future for every real successful system.
Thank you all, you have been fantastic.