How do you dress a ship with flags and on what occasions would you do it?

Dress Ship, To. To array or rig out a vessel with flags and pennants in honor of a person or event. Formerly, such display was often carried to the extreme "rainbow fashion" of running a line of bunting from waters edge to jib-boom end, thence to fore, main, and mizzeen trucks down to spanker boom, and over the stern to water; also, on special gala occasions flags were displayed in vertical line between each yard-arm, in addition to the rainbow dress. Today, a single vertical line of International Code flags at each mast, with national colors aft, house flag at maintruck, and jack at the fore commonly constitutes dressing ship in the merchant service; rainbow dress, however, often is seen, especially in naval vessels, and now amounts to a display above deck on a line from stem to stern via the mastheads. Ref: Enclopidia of Nautical Knowledge, Cornell maritime Press, Copyright 1953, 1992 ed. page 141 I don't know if the customs have changed, but in the 1970s we "dressed ship" with the rainbow whenever we were anchored in a foreign port.