Fixes container lookup not being able to find a container running for specific image.

docker ps does not receive any more arguments and we have to filter by image ourselves
This commit is contained in:
Bruno Tavares
2015-09-26 00:35:09 -03:00
parent b09cdfc3e4
commit d6da54c7ee
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ pull_sshd_image() {
}
remove_running_sshd() {
runnig_sshd=$(docker ps -q "$image_name")
runnig_sshd=$(docker ps --format='{{.ID}}\t{{.Image}}' | grep "$image_name" | cut -f 1)
[ "$runnig_sshd" ] && docker kill "$runnig_sshd" && docker rm "$runnig_sshd"
true
}