Introduction
In the era of microservices and cloud computing, Docker has become an indispensable tool for application development and de...
For further actions, you may consider blocking this person and/or reporting abuse
It'd be worth noting that a cleanup command e.g the one in the
Delete Unnecessary Files
section only reduce final image size when it's in the same RUN command as the install. That's one of the common pitfalls.
Thank you, you're right, updated the article to highlight it
Great post! Well done!
For anyone interested in learning more about Docker in general, I could suggest this free eBook here:
bobbyiliev / introduction-to-docker-ebook
Free Introduction to Docker eBook
💡 Introduction to Docker
This is an open-source introduction to Docker guide that will help you learn the basics of Docker and how to start using containers for your SysOps, DevOps, and Dev projects. No matter if you are a DevOps/SysOps engineer, developer, or just a Linux enthusiast, you will most likely have to use Docker at some point in your career.
The guide is suitable for anyone working as a developer, system administrator, or a DevOps engineer and wants to learn the basics of Docker.
🚀 Download
To download a copy of the ebook use one of the following links:
Dark mode
Light mode
📘 Chapters
Great suggestion.
Haven't read through it thoroughly, but I love the layout, and the table of content is a beauty
The timing is insane, I read this article when I need to optimize docker image.
Thanks a lot man, you just save me 🙏
very nice, thanks. there are a couple of things I did not know about, will be restructuring my dockerfiles
Congratulations. Very good examples. Thanks for sharing.
A great post fr. Thanks man, much needed
Nice post!.
Thanks for sharing.
Use a linter like hadolint, simple.
Write about caching intermediate files to speed up builds and saving on download time/bytes (nothing better than having to work on a 50kB/s connection in a developing country to learn that...)
You dont do npm ci in dockerfile, because you cant get env vars dynamically from ur CI engine, without scripting.
You build your app in CI environment and then copy artifacts to dockerfile.