Re:Alpine makes Python Docker builds slower, and images larger
by TomBombadildoze on Wednesday January 29, 2020 @04:34PM
(#22186103)
Assuming it's even possible (there are cases where it isn't), unless you're doing the entire operation in a single RUN instruction (install dependencies, compile, remove dependencies), deleting dependencies isn't enough because they'll exist in an ancestor layer before you delete them. That leads to image bloat.
This is why multi-stage builds are a thing, which the author advocates against doing.
Re:Alpine makes Python Docker builds slower, and images larger
by andoriyu on Wednesday January 29, 2020 @08:24PM
(#22188054)
I've built openresty with tons of custom plugins in a single RUN call. It's possible. Image is tiny compared to:
- debian based image for the same thing
- Not deleting build-times dependencies.
Author just doesn't know better. That's what happen you never build things from source yourself.
https://stackoverflow.com/questions/46221063/what-is-build-d...