I've seen people biking with their dogs. Many just hold the leash and hang on as they pedal. This is just an accident waiting to happen ...aka dog veering off after a squirrel and YOU taking a header into the nearest bush. Various people have come up with safer ways of engaging in this activity with their dogs. WIth pros and cons to each. Note: I have not used any of these as my tendency is to bike too fast and too inconsistently to be safe with any dog. :) But for a person who is able to bike at a slower pace consistently, these are a great way to exercise your dog.
You MUST work at your dog's pace. You aim for your dog to be at a steady trot, but be prepared if your dog is tired to slow down to a walk. Depending on your dogs condition you may need to build up your distance slowly. In time you should be able to take your mid to larger sized dog out for a 3-5 m
There is the springer - This one tends to work best with older, street model bikes. And the harness it comes with is not supposed to be great and therefore one might wish to purchase something that suits your individual dog better.
And the Walky Dog - Doesn't come with a harness. Attaches to the bike seat post which puts it up higher, also means that depending on how high you put your seat you may be able to run more than one dog (just have them running on different sides of the bike).
And the last one is BikerDog - Comes with a harness which is reported to be better than the one with the Springer. It's not as well known. Some people are concerned that the dog might be able to fall behind too much thereby making it harder to monitor it's condition while being exercised.