I have to jump in here and try to clarify the difference between "discipline" and "roughing" him up.
The fine line is you want to instill respect in your cockerel, not fear. Fear is the deal breaker, and will lead directly to bad behavior. You need to be firm with him while behaving in a way that he won't have reason to be afraid of you. If he becomes fearful, it will be very hard to get him to respect you. Instead you will become a rival.
It's very easy for people with roosters and cockerels to confuse discipline with being aggressive toward them. Any action such as sending a rooster across the yard with your foot after he attempts to flog your leg will incite fear, and inflicting pain on him is not a good idea. The war will only escalate from there. What you want to do is maintain a firm, quiet, non-reactive demeanor while taking the cockerel firmly to the ground and immobilizing him at the first sign of aggressive behavior from him.
You want to pin him to the ground and hold him there until he calms down and surrenders. Then quietly release him, making him leave you, not you turning and leaving him.
In any encounter with him, it's fine to pick him up and hold him, but it must always be your idea, not his, when to be released from your possession.
As has been pointed out, your behavior around the hens is crucial. You must be slow and deliberate and not cause any fuss among the hens in front of your cockerel. If you need to stir the harem up, it's best to remove the rooster to a location where he doesn't have to see it.
This "kid-glove" treatment is really most critical from now until his hormones settle down, from between a year and two years of age. After that, he'll be a lot less hormonal and unpredictable and you will have come to an understanding with him, and things can be a lot more relaxed.