Use envsubst instead of sed to parse Dockerfile.template
Convert everything in one pass, instead of taking a separate pass for
each variable. Thanks to aluedeke for mentioning envsubst on #docker;
I hadn't heard of it before. It's distributed as part of gettext [1],
and not in POSIX [2], so it may be slightly less portable. However,
envsubst and gettext are in Gentoo's x86 and amd64 stage1s, so it
can't be *that* uncommon ;).
[1]: http://www.gnu.org/software/gettext/
[2]: http://pubs.opengroup.org/onlinepubs/
9699919799/idx/utilities.html