Anything smaller than 5 gallons will restrict root growth and subsequently, yield.
This excludes varieties developed for containers, for example Patio F1, Tumbler F1, Tiny Tim F1, etc. I'm certain there are plenty of OP varieties that are also suited for this.
I grow only cherry varieties in 5 gallon corn syrup pails. Last season, I grew a cherry variety named Morning Light F1 (from Territorial Seeds) in a 5 gallon pail and it became an 8 foot monster.
Huge yield - too bad the fruits were mealy and bland.