- tools not needing to be shipped in the image like gnupg are not cleaned up
- changes to image are put in different layers of the multistage build
- several Dockerfiles where only one is needed
- no architecture platform support check
- no smoke test
You can find a properly optimized Dockerfile here: https://github.tools.sap/E-Mobility/mbt-docker/blob/main/Dockerfile with a section to install SAP machine with image size optimization.
And a PR showing how to reuse the same Dockerfile to generate images for different version: https://github.tools.sap/E-Mobility/mbt-docker/pull/8