2

I wonder what is the use case for jdk-slim docker image?

In which cases should I use jdk-slim instead of jre?

Are there any well-known issues (e.g. some monitoring tools are not working on jre?)

pixel
  • 24,905
  • 36
  • 149
  • 251
  • 1
    here asked before, https://stackoverflow.com/questions/54954187/docker-images-types-slim-vs-slim-stretch-vs-stretch-vs-alpine –  Apr 02 '20 at 18:15
  • @AhmetOZKESEK answers provided there do not answer in which cases I should consider `slim` over `jre` – pixel Apr 02 '20 at 20:06
  • you right, i missed jre, –  Apr 02 '20 at 21:06
  • BTW i saw there is jre-slim images on the docker hub, could be on same purpose –  Apr 02 '20 at 21:22

1 Answers1

2

jdk - stand for Java Development Kit, so it includes development tools (e.g. javac)

jre - Java Runtime Environment (no Javac, for instance).

slim - This image installs the -headless package of OpenJDK and so is missing many of the UI-related Java libraries and some common packages contained in the default tag

Do you need to build something with your image? => jdk or jdk-slim.

Do you need just to run already build app? => jre or jre-slim

P.S. It's too late for the author. Hopefully, it will be useful for somebody else.

Evgeniy Sokolov
  • 166
  • 1
  • 4