Rap (someone’s) knuckles

To punish someone slightly.

The company rapped the man’s knuckles for taking a long coffee break.