Discipline consists of being firm and consistent. When a cockerel or rooster shows any aggressive behavior, even if it's something as seemingly insignificant as dancing up to you in a sideways maneuver, reach down and grab him up and stuff him under your arm with his head backwards. Carry him around like that while you do your chores and visit with the hens. This will take him down a peg or two in the eyes of the hens, and he will be humbled.
Another good one is to push him to the ground, flattening him with his head on the dirt. Pin him there until he surrenders and becomes calm. Never release a rooster while he is struggling. Always wait for him to calm completely.
Never hit a rooster. Never kick a rooster. Do not throw objects at a rooster. Do not lose your temper. Remain calm and deliberate in all your movements and behavior around a rooster. You may use a hose or squirt gun in a pinch. I like nerf guns with those foam darts. But personal contact is best when disciplining because he will then learn to respect you as boss. This is your ultimate goal.
Roosters are quick studies. They are very smart. It doesn't take but a couple days, and he will fall into line. Once your roo has accepted discipline and his behavior is acceptable, meaning he will move out of your way as you move forward, ignore him. Ignoring a well behaved roo demonstrates that you respect him and the job he is doing. In return, he will respect you. Never handle a rooster after he has begun to come into his hormones unless it is absolutely necessary in order to address health issues.
Folks hardly ever realize how easy it is to discipline a cockerel, and in return, have a well behaved rooster you can depend on to care for the flock.