You can either run the code or develop on the code with no more "works on my machine" that way
Something like this should have done it:
FROM php:8 # install that mbstring library CMD ["however", "you", "start", "php", "apps"]