The chorus here is from Blow Ye Winds In The Morning. The earliest texts are the Greig-Duncan folk song collection and date back to at least 1909. A. L. Lloyd gives the following liner notes for his recording on Leviathan! Ballads and Songs of the Whaling Trade:

In the year of Queen Victoria's jubilee, 1887, the steamer Eclipse of Stonehaven went fishing in the Arctic with her sister ships the Eric and the Hope. Her captain, David Gray, was on one of the greatest of nineteenth century whaling skippers. By now the northern waters were nearly fished clean of right whales, and the Scottish fleet was taking whatever it could - white whales, narwhales, bottlenooses (David Gray was the first hunter of bottlenoose whale). The 1887 season was disastrous. The Erik caught one small whale, the Hope none at all. On 21 June, David Gray took a good fat 57-foot cow whose jawbones are still on show in London's Natural History Museum, but even the Eclipse, that luckiest of whalers, came home light, and with a bonus of only one-and-threepence a ton for oil. Her crew felt the trip had hardly been worth the hardship, and they marched through the streets of Peterhead to tell the owners so. The Eclipse made her first voyage in 1867. When she finished whaling, she was sold to the Russians and, renamed the Lomonosov, she was still being used as a survey ship along the Siberian coast as late as 1939.

Gavin Sutherland, in writing for the Centre of Scottish Studies at the University of Aberdeen, provides more research:

Launched from Hall's yard, Aberdeen, on 3rd January 1867 the "Eclipse" cost almost £12,000, carried eight whale boats and a crew of 55 men. After a famous career at Peterhead the ship was sold to Dundee in 1893 and later on to Norway. Renamed "Lomonosov", the old ship ended her ocean going days as a research vessel under the Russian flag based in Murmansk.
The Eclipse, flenching a whale, 1888
The Eclipse, flenching a whale, 1888