Agreed. The following is a better way to do this and gives an easy avenue to opt into this behaviour:
https://github.com/discourse/discourse_docker/pull/701