From 7d48eba01b3a929b2b1b261dccead62bbf9c1d95 Mon Sep 17 00:00:00 2001 From: Bernhard Ehlers Date: Tue, 2 May 2017 10:37:29 +0200 Subject: [PATCH] Use versioned docker API Since docker v1.13 the unversioned docker API is deprecated. Backport of gns3-server 2.0, commit effbe59 --- gns3server/compute/docker/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gns3server/compute/docker/__init__.py b/gns3server/compute/docker/__init__.py index 7b3e4d96..460472c3 100644 --- a/gns3server/compute/docker/__init__.py +++ b/gns3server/compute/docker/__init__.py @@ -113,11 +113,13 @@ class Docker(BaseManager): :returns: HTTP response """ data = json.dumps(data) - url = "http://docker/v" + DOCKER_MINIMUM_API_VERSION + "/" + path - if timeout is None: timeout = 60 * 60 * 24 * 31 # One month timeout + if path == 'version': + url = "http://docker/v1.12/" + path # API of docker v1.0 + else: + url = "http://docker/v" + DOCKER_MINIMUM_API_VERSION + "/" + path try: if path != "version": # version is use by check connection yield from self._check_connection()