try/except for docker host connection