Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow setting UID and GID when running a docker container #4776
Fix #3520 by allowing the UID and GID of the
This is done using
Prior to this pull request, gogs files are written using uid/gid 1000:1000 as these are the id's of the docker
Apologies for changing so much of the finalize.sh script. I had to in order for the container to build correctly (beforehand it would build, but /app/gogs/docker was empty) so that I could test it works.
I've also added a usermod command when creating the
I ended up writing a fresh Dockerfile. I've got the above working, alpine based, using s6 overlay, su-exec (instead of gosu as it's 4kb instead of 1.8mb). The image (compressed) is 16mb smaller than the gogs one (although may be missing a few bits).
But... best of all the container can run in