Here you are changing the template for the runtime when building a single container.  If I have an lxc template where I hard code an ip or host name, every container run and built from that docker daemon will have the same hostname.  I would think that custom templates used for a build would not affect the entire daemon and only exist for that build.