As was said on another thread use ACV mixed with water to clean the dogs ears. I have a dropper and drop a few drops in and then leave for 5 minutes and then wipe clean with a cotton bud wrapped with extra cotton wool. I also use a small torch which I hold in my mouth so I can see into the ear properly.
Garlic is said to contain natural antibiotic for the ears. Soak garlic in olive oil for a few hours and it's ready to go.
Your dog could have ear mites if there is a black/brown residue coming out of the ears. My dogs had these and I used Olive oil/neem oil mix 70/30mix and cider vinegar 50/50 everyday for a couple of weeks. (Some dogs are very sensitive to Cider vinegar. It is better to get a dog used to oil first and work up to ACV if a dog doesn't like getting it's ears cleaned)
If the dog is really sensitive in his ears prob better to get him used to touching the ears and desensitizing him to touch there before you go putting in vinegar or any cleaners.
I always clean and treat my dogs ears when they are lying on their side. I find it much easier to control a dog lying sideways.
You can practice with putting the dog in a down and then trying to teach him to roll over from there onto his side. You can do this with food to start getting the dog used to it.
Once the dog is on his side, you check the ears, feet, legs, belly, just to get him used to being touched and lying still. I will usually get a cotton bud then and let the dog smell it so he knows it is no harm to him, and then I'll touch him around the ear with the bud so he can get used to the sensation.
Then tell him roll over and do the other side. Then tell him free and give him another treat. He should start to associate the process with good things or at least a neutral energy.
Then go through the same process putting a little oil into the ear. I'd start with olive oil as this is good for the dogs ears and a taste and scent that a dog may like. Put the oil on a cotton bud, give the dog a scent of it and then gentle rub his ears with it. After a few times of this, you can get a dropper and go through the same process and drop a small amount of oil into the ears.
Over time the dog begins to accept this treatment as normal. Sometimes you have to counter a dogs desire to get up and escape. That's why I find it easier when the dog is lying sideways to begin with. It is pretty easy to keep them there and relax them and do a bit of an inspection or clean the ears or whatever. If they get flighty or try to twist wait and put a bit of pressure on them so they know to stay. I will hold the dog by the neck and where back leg joins body. They can't get up if done properly. If a dog does struggle it soon realizes it is in vain and gives up. I can't see many dogs actually enjoying getting their ears cleaned but they will tolerate it if you do it right.