This song is thought to have originated in the Royal Navy, thought it was also traditional under the "Red Duster" -- the British flag flying on merchant or passenger ships.