From 5a7f5d2950be801bbe40e7a2d0dedde06d9f2f9c Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Tue, 4 Oct 2016 21:14:19 +0200 Subject: [PATCH] Check if GNS3 has access to all docker resssources Ref #702 --- gns3server/compute/docker/docker_vm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gns3server/compute/docker/docker_vm.py b/gns3server/compute/docker/docker_vm.py index ecc2d197..b0875fc1 100644 --- a/gns3server/compute/docker/docker_vm.py +++ b/gns3server/compute/docker/docker_vm.py @@ -200,7 +200,10 @@ class DockerVM(BaseNode): """ :returns: Return the path that we need to map to local folders """ - binds = ["{}:/gns3:ro".format(get_resource("compute/docker/resources"))] + ressources = get_resource("compute/docker/resources") + if not os.path.exists(ressources): + raise DockerError("{} is missing can't start Docker containers".format(ressources)) + binds = ["{}:/gns3:ro".format(ressources)] # We mount our own etc/network network_config = self._create_network_config()