英文:
Why java app docker image based on eclipse-temurin JRE takes 335Mb?
问题
I'm using temurin 17-jre-jammy docker image as a base and it should take ~90Mb of space.
My app currently takes 74Mb so resulting image must be around 164Mb. But it is 335Mb.
When I'm checking layers on Docker Desktop it says that 17-jre-jammy takes ~190Mb which corresponds with the 17 JDK
Why JRE layer takes 190Mb instead of 47?) How to fix that?
I tried to find sizes of layers for the 17-jre and on the docker hub it is correct: Image hierarchy eclipse-temurin:17-jre-jammy
英文:
I'm using temurin 17-jre-jammy docker image as a base and it should take ~90Mb of space.
My app currently takes 74Mb so resulting image must be around 164Mb. But it is 335Mb.
When I'm checking layers on Docker Desktop it says that 17-jre-jammy takes ~190Mb which corresponds with the 17 JDK
Why JRE layer takes 190Mb instead of 47?) How to fix that?
I tried to find sizes of layers for the 17-jre and on the docker hub it is correct: Image hierarchy eclipse-temurin:17-jre-jammy
答案1
得分: 0
我已理解您的要求,请继续提供需要翻译的内容。
英文:
I've got the source of confusion.
JDK and JRE size on the eclipse temurin site specifies the size of compressed files. After unarchiving it will take more place.
Same thing relates to docker 17-jre-jammy image - 90Mb it is compressed size of the image (it is mentioned just above the size). And after image downloading docker always performs extracting.
So I was referring to compressed size of docker and JDK/JRE while thinking it should be final size.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论