Only create HTTP transport when required

The current Docker client assumes that there is always a URL
available, but this might not be the case if the host is stopped.