0

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?

Andrzej Sydor
  • 1,373
  • 4
  • 13
  • 28
dropkick
  • 23
  • 8

2 Answers2

0

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

enter image description here

Have a look at other available options: https://hub.docker.com/_/tomcat?tab=tags&page=1&name=8-jre8

Govinda Sakhare
  • 5,009
  • 6
  • 33
  • 74
0

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.

AstarAndy
  • 121
  • 1
  • 8