1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-25 16:28:11 +00:00

Use docker version in error message of outdated docker installation

This commit is contained in:
Bernhard Ehlers 2017-05-16 12:36:38 +02:00 committed by Julien Duponchelle
parent 7d48eba01b
commit 8b7209ea78
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -34,6 +34,7 @@ log = logging.getLogger(__name__)
DOCKER_MINIMUM_API_VERSION = "1.25"
DOCKER_MINIMUM_VERSION = "1.9"
class Docker(BaseManager):
@ -60,7 +61,7 @@ class Docker(BaseManager):
self._connected = False
raise DockerError("Can't connect to docker daemon")
if parse_version(version["ApiVersion"]) < parse_version(DOCKER_MINIMUM_API_VERSION):
raise DockerError("Docker API version is {}. GNS3 requires a minimum API version of {}".format(version["ApiVersion"], DOCKER_MINIMUM_API_VERSION))
raise DockerError("Docker version is {}. GNS3 requires a minimum version of {}".format(version["Version"], DOCKER_MINIMUM_VERSION))
def connector(self):
if self._connector is None or self._connector.closed: