Skip to content

Conversation

@Leguan16
Copy link
Contributor

When trying to push my image that uses this one as a base i encountered issues that the layer where it runs instal-packages.sh is too big.

This change reduces the layer size enough to make that possible again.

Copy link
Owner

@itzg itzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I'm curious: how much was too big for an image layer size?

@Leguan16
Copy link
Contributor Author

Since we proxy our registry through cloudflare the limit is either 100 or 200mb and the layer had 220mb.

Now I am not too sure if my observation was correct and encourage own testing but when i tried to push our image with my fix the biggest layer was 60mb. (took the most time to push).

@Leguan16
Copy link
Contributor Author

Additionally, according to the Docker Documentation official Debian and Ubuntu images already run apt-get clean automatically.

@itzg
Copy link
Owner

itzg commented Jan 14, 2026

Since we proxy our registry through cloudflare the limit is either 100 or 200mb and the layer had 220mb.

Now I am not too sure if my observation was correct and encourage own testing but when i tried to push our image with my fix the biggest layer was 60mb. (took the most time to push).

In my testing went from 267MB to 206MB after your change.

Testing with another image, it seems to be a constant reduction of 60MB regardless of how many packages were installed. So must be removing the remote repo indexes and apt-get clean was already removing the package caches.

@itzg itzg merged commit 7f69a2e into itzg:master Jan 14, 2026
1 check passed
@Leguan16
Copy link
Contributor Author

Yeah i just saw it in the Docker Desktop dashboard that it went from 865mb to 814mb. -170mb sounded off anyway. Maybe that was the compressed size or something 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants