lib/minke/docker/docker_runner.rb in minke-1.14.4 vs lib/minke/docker/docker_runner.rb in minke-1.14.5

- old
+ new

@@ -43,11 +43,10 @@ end ## # pull_image pulls a new copy of the given image from the registry def pull_image image_name - @logger.debug "Pulling Image: #{image_name}" ::Docker.options = {:chunk_size => 1, :read_timeout => 3600} ::Docker::Image.create('fromImage' => image_name) end ## @@ -73,11 +72,11 @@ container = ::Docker::Container.create( 'Image' => args[:image], 'Cmd' => args[:command], "Binds" => args[:volumes], "Env" => args[:environment], - 'NetworkMode' => @network, + 'NetworkMode' => @network, 'WorkingDir' => args[:working_directory], 'name' => args[:name], 'PublishAllPorts' => true ) @@ -165,12 +164,11 @@ def build_image dockerfile_dir, name ::Docker.options = {:read_timeout => 6200} begin ::Docker::Image.build_from_dir(dockerfile_dir, {:t => name}) do |v| data = /{"stream.*:"(.*)".*/.match(v) - data = data[1].encode(Encoding.find('UTF-8'), {invalid: :replace, undef: :replace, replace: ''}) unless data == nil || data.length < 1 - data.chomp('\n') - $stdout.puts data unless data == nil + data = data[1].encode(Encoding.find('UTF-8'), {invalid: :replace, undef: :replace, replace: ''}).chomp('/n') unless data == nil || data.length < 1 + @logger.info data unless data == nil end rescue => e message = e.message @logger.error "Error: #{message}" unless message == nil || message.length < 1 end