Do not add hostname when networking is disabled

Docker-DCO-1.0-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Merge pull request #3515 from crosbymichael/no-host-name-without-networking

Do not add hostname when networking is disabled