siemens / kas

Setup tool for bitbake based projects
MIT License
339 stars 145 forks source link

bug: remove temporary files at another layer #81

Closed developerdong closed 2 years ago

developerdong commented 2 years ago

https://github.com/siemens/kas/blob/5ecef9f91934d117c476e9da3f8ad76fd51097ae/Dockerfile#L8-L26

At the first RUN, apt-get update and apt-get install are executed, but the generated temporary files are removed at the second RUN. Docker is layer-structured, so removing the temporary files in the second RUN has no effect. These two RUNs should be merged into one to decrease the image size.

At my debian11/amd64 machine, the size of image with merged RUNs is 889MB, while the older one is 908MB.

jan-kiszka commented 2 years ago

Good point, happy to take according patches!