What folder did you install into? I had the same problem with permissions when installing into /var/discourse instead of ~/discourse
Also, you should add your username into docker group and run the install scripts without sudo.
Try these steps, they work for me (Ubuntu 18.04):
- login with your username
- install docker
wget -qO- https://get.docker.com/ | sh
- add your username to docker group
sudo usermod -aG docker username
- logout/login (apply group membership)
Run following commands without sudo!
- clone Discourse
git clone https://github.com/discourse/discourse.git ~/discourse
- start dev
cd discourse ./bin/docker/boot_dev --init ./bin/docker/unicorn
- stop dev