lib/bolt/transport/docker/connection.rb in bolt-3.7.0 vs lib/bolt/transport/docker/connection.rb in bolt-3.7.1
- old
+ new
@@ -44,11 +44,11 @@
end
def connect
# We don't actually have a connection, but we do need to
# check that the container exists and is running.
- output = execute_local_json_command('ps')
- index = output.find_index { |item| item["ID"] == target.host || item["Names"] == target.host }
+ output = execute_local_json_command('ps', ['--no-trunc'])
+ index = output.find_index { |item| item["ID"].start_with?(target.host) || item["Names"] == target.host }
raise "Could not find a container with name or ID matching '#{target.host}'" if index.nil?
# Now find the indepth container information
output = execute_local_json_command('inspect', [output[index]["ID"]])
# Store the container information for later
@container_info = output[0]