Teach your dog that an open door is not an open invitation to the outside world.
Put your dog on a leash so that you have control in case if the dog does dart out during training. Start with a door that is boring, like a bedroom door; ultimately the finished behavior will be generalized to all doors—front, back, side, sliding, French, etc.
Begin any training with low distraction to set up your dog for success. Open the door 1 inch. Reward any behavior that is related to ignoring the door—sitting, eye contact with handler, backing away from door, etc. Open the door another inch. Reward for ignoring the door. Repeat until the door is all the way open.
The ultimate reward for the dog is to go through the door with you. During training if your dog shows interest in the door or tries to go through, slowly and carefully close it and start again. Then, quickly work your way back to where the dog was ignoring the door successfully. Repeat the training at all doors leading to the outside. This little bit of training will give you peace of mind, and could save your dog's life!