最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Docker image is suddenly tripling it's size - Stack Overflow

programmeradmin4浏览0评论

I have installed Docker Desktop on my Windows, and the virtual environment is my WSL. The issue is that all image sizes seem to have tripled. Let me give you a super simple example, just having the following line in my Dockerfile:

FROM node:22.8.0-slim

And then building the image will result in around 200MB! This is wrong, as I used to get 70MB for this. I even have proof:

This shows that the whole thing should be around 70MB.

After carefully checking the layers, I noticed the issue right away, just from the first layer:

Copy ADD file:d13afefcc2b0b02b598a3ac2598fe2187db41de1e17820e5b600a955b1429d59 in /

This line should be around 29MB, but for me, it is 74MB!! To avoid complicating things, I won’t mention the remaining layers, but they follow the same issue.

Can someone please explain to me what is going on and what the issue might be?

Finally here is an image that shows all the layers:
Thank you!

发布评论

评论列表(0)

  1. 暂无评论