Coffee can be grown in a container. In the ground it is a tree or shrub that gets about 10 ft tall. It is an understory tree and is in the gardenia family. So, if you can grow gardenia, it is about the same.
Since I live in Hawaii, I know about growing coffee here best. I in zone 12a. Remember the Folger's coffee commercial with Juan and the donkey and about the best coffee being mountain grown. Reality is that most commercial coffee is grown at between 1000-2000 ft elevation. It prefers the cooler temperatures and more acidic soil than what it would have near the seashore but it is not frost tolerant. Being an understory tree it helps to have nurse trees to protect it from wind and sometimes give it additional dappled shade especially if the area is very hot. Like most plants in the gardenia family it is a relatively heavy feeder and you need to keep on top of the pests.
https://www.ctahr.hawaii.edu/oc/freepubs ... ffee08.pdf