为什么基于eclipse-temurin JRE的Java应用Docker镜像占用335MB?

huangapple go评论75阅读模式
英文:

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.

为什么基于eclipse-temurin JRE的Java应用Docker镜像占用335MB?

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
为什么基于eclipse-temurin JRE的Java应用Docker镜像占用335MB?

为什么基于eclipse-temurin JRE的Java应用Docker镜像占用335MB?

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.

为什么基于eclipse-temurin JRE的Java应用Docker镜像占用335MB?

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
为什么基于eclipse-temurin JRE的Java应用Docker镜像占用335MB?

为什么基于eclipse-temurin JRE的Java应用Docker镜像占用335MB?

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.

为什么基于eclipse-temurin JRE的Java应用Docker镜像占用335MB?

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.

huangapple
  • 本文由 发表于 2023年6月30日 02:43:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/76583837.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定