KBExit I heard that when the server restarts, you lose all extensions
This might have been an issue with a specific Docker image created by the community. But there's no reason Flarum couldn't run in Docker when properly setup, as it's just "another" PHP app.
These kind of issues are more likely when trying to create a general-purpose Docker image, as obviously there's not just the database you need to persist. But if you create your own images for a specific site, you could actually make the entire PHP code readonly and only deal with the usual stuff like database and file uploads.
At least, that's how I understand it. My experience with Docker is very limited and I never tried running Flarum in a virtual or containerized environment.
Regular web hosting, ideally host-isolated, can get you very far already.