I've grown tomatoes in a whiskey barrel. (It's a Tennessee thing.) The soil was only about 15" deep. The plants must still have adequate water, drainage, sun, air, and fertility.

Ed