The reason that "gallon" in "five gallon bucket" is not pluralized is because it's not a noun; it's an adjective. You wouldn't describe a bucket that contained nails as the "nails bucket", but the "nail bucket". I've never heard of not pluralizing a noun that is preceded by a non-zero whole number. Well, other than with "cents" in certain rural areas: "How much is that gumdrop?" "Five cent."
_________________________
Bitt Faulk