Well, I've found that with roosters you have to discipline them early. When they peck or try to attack you, they are testing their boundaries and you have to let them know where those boundaries are. It's hard to do with a really young cockerel, like, say, four months old or so. At that age, I've found that they are still baby enough to not really understand a lot of hard "rooster" discipline. Once they start to mature, though, they will test their limits a lot. It may just be breeding, but I've used this same method with our BO rooster, who is an angel, and his three sons. We have an enclosed run for our flock, and every time one of the cockerels pecks me or runs at me, I'll grab them and let them have a time-out outside. This doesn't really work very well in the daytime unless you can sit at the run/coop door for hours on end, but it works very well at night. It send the message that this is YOUR coop not HIS. After a while, they start to get the idea. However, they will still be roosters; our BO will still run at strangers or people who are afraid of him. He is protecting his hens, so I let it go as long as he doesn't hurt anyone or do that to me.
Also, love him up a lot. If he gets the idea that you are safety, then, once he's been put in his place, he may even want you to pick him up, hold him, cuddle him, baby him, hide him in your coat when it's cold . . .