Hmm..interesting question. You mean just the modern domestic type dog, right? Not wolves or anything..which of course have been around for millions of years. I would guess 12,000 years. Maybe there's a site that has more accurate answers?!
Ask a question and you're a fool for three minutes; do not ask a question and you're a fool for the rest of your life.
Close about 15,000 years. All wild wolves descended from Asia (National Geographic). I would think nomadic hunter gathering societies 15,000 years ago encountered wolves along the way. With food scraps being left as man travelled, wolves began following these human packs. Eventually, wolf and man began working together to catch food.