If Discourse changes, or if you are otherwise unsuccessful in getting the steps above to build your forked Discourse, this is a backup set of steps that I found should also work:

link1. Fork discourse/discourse_docker and update web.template.yml

Fork discourse_docker, open templates/web.template.yml and add the following lines before the exec block that begins with cd: $home, see screenshot:

- exec: git remote set-url origin https://github.com/your-org/discourse.git
- exec: mkdir -p /var/spool/anacron

The latter line is probably FUD, but I found my Docker install failing for inability to access that directory, so I'm including it here in case your install also complains about the lack of that directory.