Эх сурвалжийг харах

[ci skip] Fix bug with stopping (#3568)

Mike Smith 7 жил өмнө
parent
commit
9fddfc0be0

+ 1 - 1
README.md

@@ -45,7 +45,7 @@ That run script is pretty wordy, but each and every flag is required. Unfortunat
 
 
 You may not want to call step 4 from above every time. You can add an `alias` to your `~/.bash_aliases` file to shorten it since it will not change once configured:
 You may not want to call step 4 from above every time. You can add an `alias` to your `~/.bash_aliases` file to shorten it since it will not change once configured:
 
 
-`$ alias tfb="docker network create tfb > /dev/null 2>&1 && docker run -it --network=tfb -v /var/run/docker.sock:/var/run/docker.sock --mount type=bind,source=[ABS PATH TO THIS DIR],target=/FrameworkBenchmarks techempower/tfb"`
+`$ alias tfb="docker network create tfb > /dev/null 2>&1; docker run -it --network=tfb -v /var/run/docker.sock:/var/run/docker.sock --mount type=bind,source=[ABS PATH TO THIS DIR],target=/FrameworkBenchmarks techempower/tfb"`
 
 
 `$ source ~/.bash_aliases`
 `$ source ~/.bash_aliases`
 
 

+ 1 - 1
deployment/vagrant/bootstrap.sh

@@ -39,7 +39,7 @@ Welcome to the FrameworkBenchmarks project!
 EOF
 EOF
 
 
   cat <<EOF > /home/vagrant/.bash_aliases
   cat <<EOF > /home/vagrant/.bash_aliases
-alias tfb="docker network create tfb > /dev/null 2>&1 && docker run -it --network=tfb -v /var/run/docker.sock:/var/run/docker.sock --mount type=bind,source=/home/vagrant/FrameworkBenchmarks,target=/FrameworkBenchmarks techempower/tfb"
+alias tfb="docker network create tfb > /dev/null 2>&1; docker run -it --network=tfb -v /var/run/docker.sock:/var/run/docker.sock --mount type=bind,source=/home/vagrant/FrameworkBenchmarks,target=/FrameworkBenchmarks techempower/tfb"
 EOF
 EOF
 
 
   sudo mv motd /etc/
   sudo mv motd /etc/

+ 5 - 6
toolset/utils/docker_helper.py

@@ -219,9 +219,6 @@ def stop(benchmarker_config=None,
                     container.image.tags
                     container.image.tags
             ) > 0 and 'techempower' in container.image.tags[0] and 'tfb:latest' not in container.image.tags[0]:
             ) > 0 and 'techempower' in container.image.tags[0] and 'tfb:latest' not in container.image.tags[0]:
                 container.stop()
                 container.stop()
-                # 'techempower/tfb.test.gemini:0.1' -> 'techempower/tfb.test.gemini'
-                client.images.remove(
-                    container.image.tags[0].split(':')[0], force=True)
     else:
     else:
         # Stop all our running containers
         # Stop all our running containers
         for container in containers:
         for container in containers:
@@ -236,12 +233,14 @@ def stop(benchmarker_config=None,
                     container.image.tags
                     container.image.tags
             ) > 0 and 'techempower' in container.image.tags[0] and 'tfb:latest' not in container.image.tags[0]:
             ) > 0 and 'techempower' in container.image.tags[0] and 'tfb:latest' not in container.image.tags[0]:
                 container.stop()
                 container.stop()
-                # 'techempower/tfb.test.gemini:0.1' -> 'techempower/tfb.test.gemini'
-                client.images.remove(
-                    container.image.tags[0].split(':')[0], force=True)
     else:
     else:
         database_container.stop()
         database_container.stop()
 
 
+    client.containers.prune()
+
+    if benchmarker_config.server_docker_host != benchmarker_config.database_docker_host:
+        database_client.containers.prune()
+
 
 
 def find(path, pattern):
 def find(path, pattern):
     '''
     '''