Closed LaurentGoderre closed 2 months ago
@whalelines the answer to both questions is that the second install step relies on the cache not being cleared in the previous step. So either we duplicate the update and clear cache or we put them in the same layer. The latter is faster to build
But if you are combining those two RUN
steps into one, why would you run the purge step at all in the middle of it?
That purge gets rids of build dependencies for the PHP deps which is not the same as the cache.
@LaurentGoderre thanks for your contribution
Collpase installation layers and image went from 550Mb to 370mb