I wrote the following article. How to Reduce Docker Image Size.
Check the list here: The Best Strategies to Slim Docker Images: How to Reduce Docker Image Size - Semaphore
Let me know your comment about it. I will appreciate it.
Share and learn in the Docker community.
I wrote the following article. How to Reduce Docker Image Size.
Check the list here: The Best Strategies to Slim Docker Images: How to Reduce Docker Image Size - Semaphore
Let me know your comment about it. I will appreciate it.
Welcome to the Forum! And thank you for sharing!
It is generally a clean and well written blog post.
Though, you might want to rethink this part:
The final image of your application is created by copying code files and dependencies from the previous stages. This means Docker will discard any intermediate files and build artifacts that are no longer needed to create your final build.
If the FROM instruction of a stage uses a named stage, it will use all of its image layers. Pretty much like if you had built an image from the named stage alone, and used that image in the FROM instruction of your second image. Nothing is deleted. That’s why COPY --from
is so popular, as it allows copying specific files/folders from a named stage into the current stage.
Further suggestions: