mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
fixed the way docker containers are terminated
This commit is contained in:
1 parent
0ab95ae043
commit
9ee1d9d71a
3 files changed
+8
-2
No files matched your search
@@ -25,6 +25,7 @@ import shutil
|
||||
import asyncio
|
||||
import subprocess
|
||||
import logging
|
||||
import aiohttp
|
||||
import docker
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@@ -126,7 +127,7 @@ class Docker(BaseManager):
|
||||
|
||||
if cid not in self._vms:
|
||||
raise aiohttp.web.HTTPNotFound(
|
||||
text="Docker container with ID {} doesn't exist".format(vm_id))
|
||||
text="Docker container with ID {} doesn't exist".format(cid))
|
||||
|
||||
container = self._vms[cid]
|
||||
if project_id:
|
||||
|
||||
@@ -128,7 +128,7 @@ class Container(BaseVM):
|
||||
def stop(self):
|
||||
"""Stops this Docker container."""
|
||||
result = yield from self.manager.execute(
|
||||
"stop", {"container": self._id})
|
||||
"kill", {"container": self._id})
|
||||
log.info("Docker container '{name}' [{image}] stopped".format(
|
||||
name=self._name, image=self._image))
|
||||
|
||||
|
||||
Reference in new issue
Block a user