Alcoholism is not an OCD (obsessive compulsive disorder). However, there are many things about alcoholism that resembles OCD. People with alcoholism have recurrent thoughts about having a drink, to the point where it seems obsessional in nature. And the act of drinking seems compulsive in nature.
But alcoholism is a substance abuse disorder. Anxiety is not the primary problem, as it is in OCD. In alcoholism, the problem is the alcohol, and the thoughts and act of repeated drinking are a consequence of the dependence and tolerance on alcohol, also known as an addiction to alcohol.
In OCD, there is no addiction to any substance or behavior. In OCD, it is primarily an anxiety problem, where your thoughts about a trigger induce anxiety, and your compulsions are attempts to reduce that anxiety. Sure, you may drink alcohol to calm your nerves, but repeatedly drinking alcohol is not a compulsion as defined from an OCD perspective. Rather, drinking alcohol in the context of dependence and tolerance is an addiction, not a compulsion.
So in summary, an addiction (alcoholism) is repeated use of a substance or behavior with dependence and tolerance, while a compulsion is an act to reduce anxiety from obsessions.