Java JRE/JDK dockerfile

Can you give any tips on how to create a ‘lightweight’ and optimal docker container to run a Java jar file. Or point to a’trusted’ Java JDK/JRE base docker image that you recommend

have you checked out the official images

the readme shows an example dockerfile

Yes, I have been using the official images, but they weigh in at a hefty 8-900MB when the dockerfile image is built. Not sure if that is too much Linux, or too much Java…

1 Like

got your point :smile:

I know that some have moved to use Alpine linux, here is an article by Atlassian

it should decrease a fair bit, under 200mb for a java docker image