The written lyrics to the song are not dirty in any way, shape, or form. It is a sailor’s lament to the ship’s lieutenant (”Louie” being slang for lieutenant) about the girl waiting for him at home and how he misses her. Pretty tame stuff.
However, it does seem to be a certainty that many who have performed it over the years have had their own unique... err... take on the lyrics, and that specific versions of the song might very well be unsuitable for more tender ears.
I thought “Louie” was a bartender in a distant port.... no?