Created
March 16, 2015 19:38
-
-
Save sds/911c5d38ee6e4cada1c3 to your computer and use it in GitHub Desktop.
Override rm_container to properly shutdown containers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'kitchen/driver/docker' | |
module Kitchen | |
module Driver | |
class Docker < Kitchen::Driver::SSHBase | |
... | |
def rm_container(state) | |
container_id = state[:container_id] | |
docker_command("exec #{container_id} shutdown now") | |
docker_command("wait #{container_id}") # Wait for shutdown | |
docker_command("rm #{container_id}") | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This does not work for me, or perhaps in does also not work with newest versions. I tried with following versions:
And i receive this error:
Any Idea how to fix this?