HI Brian,
Thanks for sharing your code. We have just discussed your approach as one possibility of solving our problem, but delayed it as it involved too much hacking :). Now that you've done the hacking, we may revisit it.
We were also discussing a possibility of creating access groups with Galaxy UID and cluster process ID to get around the permissions problem that Iyad has described. This would involve extra setup outside Galaxy container, but would possibly remove the need to change GID and UID. Will reply when we've solidified and tested our approach.
Bjorn,
I would second Brian on being able to configure Galaxy for different environments. To us that was the primary reason of going the docker way. We have considered vagrant, since it seemed like a more mature and more flexible technology for running in production, but went with docker, because Galaxy community supports it.
I would personally like to be able to change build-time variables at build, since it's more logical, requires less hacks and the build speed is not as important to me when building containers for different environments, since I'm not going to do that often. I.e.I would still have your lightweight way as a default, but allow to change it for those who need it. That said, I would welcome any standardized solution, be it run time or build time.