lib/kitchen/docker/helpers/image_helper.rb in kitchen-docker-2.10.0 vs lib/kitchen/docker/helpers/image_helper.rb in kitchen-docker-2.11.0

- old
+ new

@@ -24,12 +24,13 @@ include Kitchen::Docker::Helpers::CliHelper include Kitchen::Docker::Helpers::ContainerHelper def parse_image_id(output) output.each_line do |line| - if line =~ /image id|build successful|successfully built/i - return line.split(/\s+/).last + if line =~ /image id|build successful|successfully built|writing image/i + img_id = line.split(/\s+/).last + return img_id end end raise ActionFailed, 'Could not parse Docker build output for image ID' end @@ -48,10 +49,11 @@ file = Tempfile.new('Dockerfile-kitchen', Dir.pwd) output = begin file.write(dockerfile) file.close docker_command("#{cmd} -f #{Shellwords.escape(dockerfile_path(file))} #{build_context}", - input: dockerfile_contents) + input: dockerfile_contents, + environment: { DOCKER_BUILDKIT: '0' }) ensure file.close unless file.closed? file.unlink end