There are also dwarf 'Bartlett' pear tree varieties that only grow 8 to 10 feet tall — which you can look for at your local ...
All kinds of tasty fruit can be grown in containers in small spaces, from dwarf citrus to cherries, apples, pomegranates, ...