532M -> 91M using the alpine image. I think 82% reduction is enough to close this though there miight be a little more (albeit negligible) fat to skim off the top. I verified XDebug still works just fine.
There is one caveat to alpine, which is the fact that everything links to musl instead of glibc. Which is iirc about a 5%~ performance hit in the worst case.
I didn't want to mix it up into this PR but reordering some of this might make caching better. ENVs aren't used within the build so they should go to the very bottom and a couple other things I might look into later.
532M -> 91M using the alpine image. I think 82% reduction is enough to close this though there miight be a little more (albeit negligible) fat to skim off the top. I verified XDebug still works just fine.
There is one caveat to alpine, which is the fact that everything links to musl instead of glibc. Which is iirc about a 5%~ performance hit in the worst case.
I didn't want to mix it up into this PR but reordering some of this might make caching better.
ENV
s aren't used within the build so they should go to the very bottom and a couple other things I might look into later.