Sahih al-Bukhari, Hadith 400 ⓘ
Narrated Jabir: Allah's Messenger used to pray (optional, non-obligatory prayer) while riding on his mount (Rahila) wherever it turned, and whenever he wanted to pray the compulsory prayer he dismounted and prayed facing the Qibla.
حَدَّثَنَا مُسْلِمٌ، قَالَ حَدَّثَنَا هِشَامٌ، قَالَ حَدَّثَنَا يَحْيَى بْنُ أَبِي كَثِيرٍ، عَنْ مُحَمَّدِ بْنِ عَبْدِ الرَّحْمَنِ، عَنْ جَابِرٍ، قَالَ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم يُصَلِّي عَلَى رَاحِلَتِهِ حَيْثُ تَوَجَّهَتْ، فَإِذَا أَرَادَ الْفَرِيضَةَ نَزَلَ فَاسْتَقْبَلَ الْقِبْلَةَ.
also referenced under: Book 8, Hadith 51 (In-Book) & Volume 1, Book 8, Hadith 393 (USC-MSA)