2, 4 and 5 are correct.
It depends on whether you're using `dozen' as an adjective or as a noun. Nouns can be singular or plural; adjectives are unit-less (as the noun that the adjective is qualifying carries the numerical dimension).
Referring to 2 and 4:
The word "dozen" is being used as a quantifying adjective and the "of" is implied, just like when you use a numeric value.
Think of it this way - you would say "Twelve eggs" not "Twelve of eggs".
"Dozen" is just a word that means a group of twelve, so the same pattern is used.
In #5 you are using dozen as a noun (in the plural form), so the grammatical structure is a little different, you're not just using dozen as an adjective indicating a numeric quantity.
So in this case the "of" is required.
Another way of looking at it is that in #2 and #4 your talking about eggs ... and the sentence is informing us how many there are ... Dozens! - It's a quantity.
The sentence in #5 is talking about the "dozens", and the sentence is telling us not how many dozens there are, but what are the objects comprising the dozens? ... Eggs! it's not a quantity, but a description.