diff --git a/behave_utils/docker.py b/behave_utils/docker.py index 609506f44de9e0bf81d0e61379da4dcaf0a7c24b..d9d68af98a91a7932f8764ecba30e7d3f4f7f94e 100644 --- a/behave_utils/docker.py +++ b/behave_utils/docker.py @@ -1,4 +1,4 @@ -# Copyright 2021-2022 Dominik Sekotill +# Copyright 2021-2023 Dominik Sekotill # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this @@ -342,7 +342,10 @@ class Container(Item): else: opts.append(b"--network=none") - self.cid = docker_output(b"container", b"create", *opts, self.image.iid, *self.cmd) + self.cid = docker_output( + b"container", b"create", "--rm", + *opts, self.image.iid, *self.cmd, + ) assert self.cid # Disconnect the "none" network specified as the starting network