The way a craving develops is like this:
trigger--> thought-->continued thoughts-->cravings-->drinking
The first line of defense is to stay away from triggers.
If you get triggered and have a thought about drinking, immediately shut it off by thinking about something different. Imagine a light switch that is turned on to thinking of drinking and imagine yourself flipping that switch off.