How to add Dogmeat as a companion?
Fallout 4 Guide

Dogmeatis the first companion you can add to your team while playing Fallout 4. You will be given opportunity to find the dog at the very beginning of the game, soon after leaving Vault111and arriving at Sanctuary(Out of Time main quest). Travel to the south-east from the Sanctuary and you'll soon reach the RedRocket Truck Stopshown on the screen above.

Find the dog and "talk" to the animal

Once you've arrived at the truck stop you should notice a dogin the distance. Approach the dog, pet it and allow it to follow you. Dogmeatwill be your companion from now on. You can give the dog simple commands, use the animal in combat and order it to go on treasure hunts. You can send back Dogmeat to Sanctuary (or to one of other settlements) at any time.