Abu Hurairah reported,

The Prophet ﷺ said that a man saw a dog eating moist earth out of thirst, so the man took off his leather sock and began scooping water with it until he quenched the dog's thirst. Allah was grateful to him and admitted him into Paradise.Ahmad bin Shabib said, my father narrated to us from Yunus, from Ibn Shihab, who said, Hamza bin Abdullah narrated to me from his father, who said, "Dogs used to urinate and come and go in the mosque during the time of the Messenger of Allah ﷺ, and they would not sprinkle water over any of that."

Bukhari 174

Sahih

حدثنا إسحاق أخبرنا عبد الصمد حدثنا عبد الرحمن بن عبد الله بن دينار سمعت أبي عن أبي صالح

عن أبي هريرة

عن النبي ﷺ أن رجلا رأى كلبا يأكل الثرى من العطش فأخذ الرجل خفه فجعل يغرف له به حتى أرواه فشكر الله له فأدخله الجنة وقال أحمد بن شبيب حدثنا أبي عن يونس عن ابن شهاب قال حدثني حمزة بن عبد الله عن أبيه قال كانت الكلاب تبول وتقبل وتدبر في المسجد في زمان رسول الله ﷺ فلم يكونوا يرشون شيئا من ذلك

البخاري 174صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Wudu
Chapter
If a dog drinks from one of your vessels, wash it seven times
Numbering
Darussalam 174
Bukhari 174