Currently the top of my docker image is this:
FROM tomcat:8-jre8
This docker image is consuming a ton of memory. Could that be because the incorrect version?
tomcat:8-jre8
is a very huge image. You can reduce image size significantly by using the alpine
or slim
version.
docker pull tomcat:8-jre8-alpine
Check the comparison 8-jre8
and 8-jre8-alpine
tags below
Have a look at other available options: https://hub.docker.com/_/tomcat?tab=tags&page=1&name=8-jre8
Not sure if, in your case, you must use Tommy but, if you just want a web server you may want to try using a jre8 image that uses jetty such as https://hub.docker.com/_/jetty or another good one is undertow. Basically TommyCAT is very big whereas Jetty or Undertow are smaller web servers. See if you can't update your FROM... line and try jetty or undertow and see if you get better memory usage.