Docker_dev image broken for users other than UID 1000

I lost more hours on this than I care to admit. It worked fine on my machine, but wouldn’t work where I was trying to make it work (trying to set up an environment where a client could painlessly re-run an import). docker_dev seems like a great way for a Normal Person to be able to run an importer.

Darn. It’s not quite the “first user” as I just added a user on a Digital Ocean droplet (their image has no normal user); I added a user, added that user to the docker group and tried to run boot_dev as that user and got the same permission error.

I was hoping that this would a good-enough test and error message to add to boot_dev, but it isn’t. Is there some simple test?


if [ "$UID" != 1000 ]
then
    echo "discourse_dev expects to be run by first user (UID 1000)."
    exit 1
fi

This is getting far afield from the OP, I was hoping too that docker_dev might be a solution to my “what if I need to run a couple imports and do development on something else all at the same time” problem, but it’s not quite that yet.