Building Discourse image from discourse/discourse - how to install plugins

Maybe, but the container needs to talk to some database to build the container, usually. It doesn’t need to be the actual database (but then you need to migrate the database and precompile assets in your pipeline).

You may be conflating the issue of Discourse upgrades vs updates of the resources in the base container.

If you’re ok with the bleeding edge, there’s this: Is Docker image discourse/discourse considered safe and production-ready? - #14 by JackNZ