jwilder/docker-gen — pull request #28 by JustAdam (2014-09-22 21:18:12+00:00)
Title: Removed use of temp file for comparison.

The creation of a new output file each time the config changes causes problems with its ownership and permissions; when the output file is on a Docker volume.
Without doing additional user adding/user space mapping stuff, Docker writes the file as root:root and 0600, which for all sense and purposes makes it unreadable for everything else.
If a file already exists, then the file's ownership and permissions are left untouched by Docker.

I couldn't see why a temp file was being used so this patch removes the use of it, and instead will truncate and overwrite the existing file.