Bismihi ta'ala
There is no shar'i problem in touching, patting or feeding a dog. If your hands, or the dog is wet, then after patting you must wash your hand, because contamination of najasah occurs with contact and wetness.
But if it is dry, then you do not need to do anything.
And Allah knows best.