Bunkers are made of concrete, much weaker than the steel hull of a submarine which needs to continuously hold several atmospheres of pressure.
The most important thing was that the submarine was in dry dock. Most damage is done by sea water, which gets everywhere and corrodes things.
Here's the damage done to the USS Cole, which was in water at the time.
It was successfully repaired and went back to service.
As others have pointed out, cruise missiles don't carry shaped charges so any damage is going to be superficial. Replace the damaged panels and it'll be as good as new.