lib/kitchen/driver/docker.rb in kitchen-docker-1.6.0 vs lib/kitchen/driver/docker.rb in kitchen-docker-1.7.0

- old
+ new

@@ -65,12 +65,12 @@ 'You must first install the Docker CLI tool http://www.docker.io/gettingstarted/' end def default_image platform, release = instance.platform.name.split('-') - if platform == "centos" && release - release = "centos" + release.split('.').first + if platform == 'centos' && release + release = 'centos' + release.split('.').first end release ? [platform, release].join(':') : platform end def default_platform @@ -239,10 +239,10 @@ container_id = state[:container_id] docker_command("inspect #{container_id}") end def container_exists?(state) - !!inspect_container(state) rescue false + state[:container_id] && !!inspect_container(state) rescue false end def parse_container_ssh_port(output) begin info = Array(::JSON.parse(output)).first