Installing tomcat on Docker on Windows 10

Installing tomcat on Docker on Windows 10
Installing tomcat on Docker


>docker pull tomcat

>docker run -it --rm tomcat:9.0

Run the default Tomcat server (CMD [“catalina.sh”, “run”]):


$ docker run -it --rm tomcat:9.0

You can test it by visiting http://container-ip:8080 in a browser or, if you need access outside the host, on port 8888:


$ docker run -it --rm -p 8888:8080 tomcat:9.0

You can then go to http://localhost:8888 or http://host-ip:8888 in a browser (noting that it will return a 404 since there are no webapps loaded by default).

Other way to run tomcat
docker pull tomcat:latest
docker run -d –name mytomcat -p 8888:8080 tomcat:latest
docker exec -it mytomcat /bin/bash
mv webapps webapps2
mv webapps.dist/ webapps
exit

http://localhost:8888/