I’m not quite sure why you’re having that problem, but you’ll experience considerably less pain if you do it this recommended way: Beginners Guide to Install Discourse for Development using Docker
See also, Can Discourse ship frequent Docker images that do not need to be bootstrapped?