Docker image increases size itself

Hello everyone!

I have a linux VM with fedora server distro. In it I have several dockers running without any problem. But I have a specific one with an image that increases its size with every new version of that buildt.

In my case I use a system that uploads the code of my api to the fedora server. The code has the dockerfile to build the image, it is a Flask API that uses libraries to work with images and IA predictions. For each upload the system creates a new image with a the same name different tag which references the new version. Then, the previous image (with the same name but different tag) is removed and it runs a new docker with the latest image version.

The problem comes when the image is built. On my Windows machine, where I develop the API, build the images, and run the dockers, the image size is 13GB. But when I deploy the image on the server its size is 30GB, here is the first case I don’t understand. Not only the size increases compared to the windows system, the size of the image created in the server is bigger than the previous version, it increases the size arround 2/3 GB more.

Anyone can help me to understand and recommend me any tip or something to solve these cases?

If anyone has any media content or data write me!

Thanks to all!

You run containers, not Dockers (garment company).

You created the topic in the Docker Destkop category. Do you run Docker Desktop in a fedora virtual machine?

Regarding the issue, you either generated some files to your docker build context that is increasing every time and you copy it into the image, or you somehow build your new imahge on top of the previously built one even if you intended to use a different tag.

please, show the commands that you run, because I have no other idea how it could happen.

What windows system? You can’t run windows containers in a Linux VM.

Sorry for the mistakes, I’m going to open the post into the correct topic and with the correct words!

I could have moved the topic to the right category, I just wasn’t sure if it was right or not. To avoid confusion and having duplicate topics I closed this one and leave the link to the other topic here: