Add hostname path when container is set in 'container' network mode

When a container is running in 'container' network mode, its `HostnamePath` is not set in `initializeNetworking`. So the `/etc/hostname` in the container will be empty. This PR adds the configuration to have correct hostname file.