-
-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Huge image size #771
Comments
Hi @welcoMattic! You can try using the dive utility to determine at what step generates such image size? |
After using dive to explore the layers of the image, here is the ouput: ![]() It looks like ~300MB come from this instruction:
But it sized to 96.81 MB in Docker Hub (https://hub.docker.com/layers/dunglas/frankenphp/1-php8.3/images/sha256-e76ed20d7f9461e99d88985512dbb8b04a9332c8d2d4218dcf5a9fabbcf3f519 see layer 4) |
This difference in size between Docker Hub and dive data is due to the fact that Docker Hub shows the size of the compressed image (and its layers), while dive shows the size by file system. However, this image only shows the layers of the |
Yes, we realize the compression size on Hub side with @dunglas this afternoon. However, I achieved to reduce the size by ~100MB by adding 2 stages for PHP extensions installation (base and dev). We also realize that ~400MB stuff is due to the PHP base image and gcc installation. I think the only way to get rid of that is to start FROM scratch and copy all the necessary compiled stuff. As docker team is not ok to remove gcc from their image. |
I'm using symfony-docker to craft a new Symfony app, a basic one. I was suprised to see the size of the Docker image just after initiate the Symfony app: 864MB
I'm using this base image:
dunglas/frankenphp:1.4.4-php8.4
, which is sized to 187.07 MB for linux/arm64 arch.I'd need help to investigate to find the root cause of this inflate of the image and find ways to fix it, especially for the
frankenphp_prod
target.cc @dunglas
The text was updated successfully, but these errors were encountered: