Search for posts by Mountain Man Jim on dog training. Basically, you need to introduce them gradually on-leash and disallow any play behaviors at first. Dog should be with you on the lead for all routine chores. Correct any chasing, nipping, eyeballing, and thoughts of yummy BBQ as soon as they occur. Then graduate to supervised work with the chickens, with you right there. Then and only then can they be left unsupervised. The whole process takes 18 months - 2 years.
And still, when doing the unsupervised thing, I would say that letting them mind some packing peanuts or extra roosters for the first several months is a good idea. My Pyrenees wasn't 100% trustworthy until he tangled with a really angry broody hen defending some chicks--he still does a lot of herding behaviors, although the broody hen taught him to keep his distance when he has them cornered.
The giant breeds I think are better for having fewer prey instincts. Or maybe it's just that the chickens can outrun them. I know my Newfie pup is actually scared of the chickens because they can run faster than her, and she's just not that into chasing anything in general.
ETA: And yes, our dogs sleep inside. On the couch, usually. Once the chickens go to bed, there's no need for them to be out there when we can use them indoors as foot-warmers.