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.
I am a professional DevOps Engineer with a demonstrated history of working in the internet industry. I am an avid Linux lover and supporter of the open-source movement philosophy.
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:
Focusing mostly on Python (Django, Jupyter, Data Science) and systems engineering.
Interested in ML, Rust, Wasm. Want to try gamedev but I'm still unsure with what language/technology
Location
Dili, Timor Leste
Work
Full stack developer that'd like very much to be able to use other languages in the browser at Catalpa International
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.
We're a place where coders share, stay up-to-date and grow their careers.
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:
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
very nice, thanks. there are a couple of things I did not know about, will be restructuring my dockerfiles
The timing is insane, I read this article when I need to optimize docker image.
Thanks a lot man, you just save me 🙏
Congratulations. Very good examples. Thanks for sharing.
Nice post!.
Thanks for sharing.
A great post fr. Thanks man, much needed
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...)
Use a linter like hadolint, simple.
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.