]> git.proxmox.com Git - mirror_qemu.git/commitdiff
docker.py: always use --rm
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Sep 2020 10:44:41 +0000 (12:44 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 18 Sep 2020 09:44:47 +0000 (10:44 +0100)
Avoid that containers pile up.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
tests/docker/Makefile.include
tests/docker/docker.py

index 3daabaa2fdd0cd0c3ed7dc383c051354fb31be17..75704268ff0a5ea67af756632adfc96c135f94f1 100644 (file)
@@ -243,7 +243,6 @@ docker-run: docker-qemu-src
                $(DOCKER_SCRIPT) run                                    \
                        $(if $(NOUSER),,--run-as-current-user)          \
                        --security-opt seccomp=unconfined               \
-                       $(if $V,,--rm)                                  \
                        $(if $(DEBUG),-ti,)                             \
                        $(if $(NETWORK),$(if $(subst $(NETWORK),,1),--net=$(NETWORK)),--net=none) \
                        -e TARGET_LIST=$(subst $(SPACE),$(COMMA),$(TARGET_LIST))        \
index 356d7618f1a7569938cd56f76649a19244cd4b49..36b786840615b0c501fb638b7f2e08bb91d208c0 100755 (executable)
@@ -377,7 +377,7 @@ class Docker(object):
             if self._command[0] == "podman":
                 cmd.insert(0, '--userns=keep-id')
 
-        ret = self._do_check(["run", "--label",
+        ret = self._do_check(["run", "--rm", "--label",
                              "com.qemu.instance.uuid=" + label] + cmd,
                              quiet=quiet)
         if not keep:
@@ -616,7 +616,7 @@ class CcCommand(SubCommand):
         if argv and argv[0] == "--":
             argv = argv[1:]
         cwd = os.getcwd()
-        cmd = ["--rm", "-w", cwd,
+        cmd = ["-w", cwd,
                "-v", "%s:%s:rw" % (cwd, cwd)]
         if args.paths:
             for p in args.paths: