In truth, if there was a simple answer to this question, they wouldn't have invented the leash for kids (oh, no way am I suggesting this - but did you see that Saturday Night Live where the kid is attached to the play structure - too funny! - ok, I am clearly digressing).
Here's an idea or two, but because he's little you'll want to keep the option short and clear. I would bring the stroller and say, "You can sit in the stroller or you can hold the side of the stroller." (Sometimes holding the stroller instead of your hand feels like such freedom and could solve the problem just by doing this). Once he chooses, then make the consequence clear, "If you let go, I will buckle you in."
Of course, he's probably used to running around so its going to take some serious stick-to-it-ness. But, I would go somewhere closer and try it out. He'll probably end up right back in the stroller. But, when he wants out, try again. Once he realizes you won't budge, he'll get used to it (sounds simpler said then done).
When he is happily holding the side of the stroller be sure in that instance to tell him how important his job his. The instant he is being an angel, reward him with your words! Isn't it fascinating how children love tasks and to feel essential.
Anyhow, he is really young, and the honest truth may be that he needs a few more months until he is not bolting.
Painting: Cherubs (Detail Sistine Madonna) by Raphael