Re:Optimizing Docker image size and why it matters
by franga2000 on Friday January 07, 2022 @04:02AM
(#29836805)
There's an issue on Github about that and it's been open for about as long as Docker has existed. Looks like they just don't care.
I’m confused why they haven’t implemented a COMMIT instruction.
It’s so common to have people chain “command && command && command && command” to group things into a single layer. Surely it would be better to put something like “AUTOCOMMIT off” at the start of the Dockerfile and then “COMMIT” whenever you want to explicitly close the current layer. It seems much simpler than everybody hacking around it with shell side-effects.