Very old joke indeed.. back in '72 there was an USN version using Enterprise as the ship involved. Of course it all just a joke.
There's a more recent version using Abraham Lincoln as the ship..one problem with that that joke has Abraham Lincoln operating in the Atlantic when indeed it is a Pacific fleet CVN.
Heres the youtube version that's been around for awhile. In this version it involves the USS MontanaI like the very last comment made by the lighthose keeper at the very end where he says to his mate about the captain of the ship. " I think he's gone.....fair enough"