Some of the dictionaries say, “Source unknown.”
We’ll agree with that as to the dory element, but, considering that the common meaning of the American term hunky-dory is “Quite satisfactory; all safe and secure,” the hunky element is logically explainable.
Though not recorded until a hundred years ago, to be “all hunk” was probably as familiar to New York City schoolchildren from the time of Peter Stuyvesant as to be “O.K.” is today, and had a similar meaning, to reach goal; to be home.
It was from the Dutch honk, “goal.” Change from hunk, “home,” to hunky, “safe at home; hence, safe,” was as natural as the modern change in slang corn to slang corny. Printed use goes back to 1861.
The full hunky-dory seems to have arisen during or soon after the Civil War. Definite record occurs in 1868.
Credit for its introduction is thus stated by Carl Wittke, in Tambo and Bones (1930):
“Josiphus Orange Blossom,’ a popular song with many disconnected and futile stanzas, in a reference to Civil War days, contained the phrase, a ‘red hot hunky dory contraband.’ The Christy’s (well-known blackface minstrels of that period) made the song so popular, that the American public adopted ‘hunky-dory’ as part of their vocabulary.”