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
https://hub.docker.com/_/java/
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
I know that some have moved to use Alpine linux, here is an article by Atlassian
https://developer.atlassian.com/blog/2015/08/minimal-java-docker-containers/
it should decrease a fair bit, under 200mb for a java docker image