Ensure containers (specifically gitserver) have consistent sourcegraph uid/gid by allocating specific ones
Created by: slimsag
When using gitserver as a non-root user, you often need to provide .ssh credentials in /home/sourcegraph/.ssh
-- but if your host volume mounted is owned by root, the sourcegraph
user in the container cannot access it. The solution is to change the owner to the UID/GID of the sourcegraph
user by running this on the host:
$ sudo chown -R 100:101 ~/my-sourcegraph-ssh-config/.ssh
But this means relying on stable UID/GIDs in our container. Currently, they are stable just due to the nature of addgroup/adduser execution order in our Dockerfile. However, we could improve this by ensuring we always allocate UID/GID 100/101 to be more explicit about it and ensure we don't regress on this.