Islam forbids Muslims to keep dogs, and the punishment for that is that the one who does that loses one or two qirats from his hasanat (good deeds) each day. An exception has been made in the case of keeping dogs for hunting, guarding livestock and guarding crops.
According to Islam Q&A