I see the official example is a bit outdated, I spent a few days and researched the existing examples and filled the missing parts to get the latest MyBB 1.8.39 up and running. Github Action workflow is included in case you want to build and push your own custom images.
I also updated php-fpm to 8.3.29 and included additional containers like Redis, MySQL, Adminer, backup scripts. Nginx is configured to forward the original client IP through X-Forwarded-For header in case you are using Traefik reverse proxy.
Here is the repository:
https://github.com/nemanjam/mybb-docker