"small box with a perforated lid, used for sprinkling ground pepper on food," 1540s, from pepper (n.) + box (n.1). Meaning "hot-tempered person" is by 1867.
Entries linking to pepper-box
pepper n.
"dried berries of the pepper plant," Middle English peper, from Old English pipor, from an early West Germanic borrowing of Latin piper "pepper," from Greek piperi, probably (via Persian) from Middle Indic pippari, from Sanskrit pippali "long pepper." The Latin word is the source of German Pfeffer, Italian pepe, French poivre, Old Church Slavonic pipru, Lithuanian pipiras, Old Irish piobhar, Welsh pybyr, etc.
Application to fruits of the Capsicum family (unrelated, originally native of tropical America) is from 16c. To have pepper in the nose in Middle English was "to be supercilious or unapproachable."
box n.1
"rectangular wooden container," usually with a lid, Old English box, also the name of a type of shrub, from Late Latin buxis, from Greek pyxis "boxwood," pyxion "writing table, box," made of boxwood, from pyxos "box tree," which is of uncertain origin. Beekes suggests a loan-word from Italy, as that is where the tree is native. Dutch bus, German Büchse "box; barrel of a gun," also are Latin loan-words.
The meaning "compartment at a theater" is from c. 1600 (box seat in the theatrical sense is by 1850). The meaning "pigeon-hole at a post office" is from 1832. The meaning "television" is from 1950 (earlier "gramophone player," 1924). The meaning "station of a player in baseball" is from 1881. The graphics sense of "space enclosed within borders and rules" is from 1929. The slang meaning "vulva" is attested 17c., according to "Dictionary of American Slang;" modern use seems to date from c. World War II, perhaps originally Australian, on the notion of box of tricks. Box lunch (n.) is attested from 1899. The box set "multiple-album, CD or cassette issue of the work of an artist" is attested by 1955. To think or act outside the box "contrary to convention" is attested by 1994.