浏览代码

Remove containers after they run (#3618)

This will leave their base images in tact, but simply remove the no-longer-running containers.
Mike Smith 7 年之前
父节点
当前提交
9320ef47e9
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      toolset/utils/docker_helper.py

+ 5 - 0
toolset/utils/docker_helper.py

@@ -181,6 +181,7 @@ def run(benchmarker_config, test, run_log_dir):
             privileged=True,
             ulimits=ulimit,
             sysctls=sysctl,
+            remove=True,
             log_config={'type': None})
 
         watch_thread = Thread(
@@ -288,6 +289,7 @@ def start_database(benchmarker_config, database):
         detach=True,
         ulimits=ulimit,
         sysctls=sysctl,
+        remove=True,
         log_config={'type': None})
 
     # Sleep until the database accepts connections
@@ -330,6 +332,8 @@ def test_client_connection(benchmarker_config, url):
         client.containers.run(
             'techempower/tfb.wrk',
             'curl %s' % url,
+            remove=True,
+            log_config={'type': None},
             network=benchmarker_config.network,
             network_mode=benchmarker_config.network_mode)
     except:
@@ -366,4 +370,5 @@ def benchmark(benchmarker_config, script, variables, raw_file):
             stderr=True,
             ulimits=ulimit,
             sysctls=sysctl,
+            remove=True,
             log_config={'type': None}), raw_file)