构建 Discourse 镜像时如何避免将数据库密码硬编码进去?

As @brahn said set that ENV var to empty in the latest hook. The run hook should work.

You can also build another image using the bootstrapped one as a base and empty that variable in a docker file.