Having a dog that escapes from the house can be very dangerous, and it's shocking to me how common this problem is. So many dogs will bolt out the door, given half a chance, and their owners have developed some elaborate routines just to get themselves out the door in the morning, without letting the dogs escape. But you can teach a dog to "Respect the Door", if you take some time and do it correctly. Here's how to train your dog so he won't run out of your house the minute you open the door.
Respect the door. Put him on leash and have him sit/stay. Holding onto the leash, open the door. If he runs out, say "oops" or "uh-oh", and bring him back inside and close the door. Repeat this as many times as necessary. It will probably have to be repeated many, many times at first. Don't let that discourage you. When he does not bolt, walk outside, holding the leash, and tell him to come outside. When he's successful, shower him with praise, and treats. But if he runs out before you give permission, go back inside, close the door, and try again. Make him wait for permission every time he goes outside, even if he's going out into a fenced yard. That's really important, because if he thinks that bolting out ahead of you is OK sometimes, he's never going to learn to respect the door. Every time you do this "game" it will take fewer times before he waits for permission. Eventually he will come to respect the door and understand that he needs permission to go outside. Remember that he's counting on you to keep him safe. You must be consistent with your training.