Reduce container images' number of layers
https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#env
Each ENV line creates a new intermediate layer, just like RUN commands.
And those layers are not needed for oss-fuzz.
I couldn't really find why it's bad to have more layers? Could you explain?
Ping
It is (was?) one of the best practices, recommended by Docker Inc.
https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#minimize-the-number-of-layers
In older versions of Docker, it was important that you minimized the number of layers in your images to ensure they were performant.
But it may be not that relevant anymore, in terms of the runtime performance.
It still affects the container image's total size, since each layer have some metadata.
Could you do me a favor and show me what the difference is? If it is negligible I'd rather keep things as is.
Sure. Let me take a look next week.
I'm very open to this change, I optimize our docker images a lot because fast (pull) and slim (disk) images make cifuzz/ClusterFuzzLite's UX much better, but I assume you don't have the cycles for this. Please reopen if I'm mistaken and thank you for making this effort.