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:
web.template.ymlFork discourse_docker, open templates/web.template.yml and add the following lines before the exec block that begins with cd: $home, see screenshot:
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.