Baobabs can get enormous, and even the "smaller" species get to be really big. I am not sure how you are going to convince a potted baobab that it has the right conditions to fruit in. Flowering and fruiting take a lot of energy and nutrients, but I am not sure how you are going to provide such a large tree the space and nutrients to do so.
That being said, I do not want to discourage you from growing baobabs or any other large fruit plant that is not recommended for container growing. I certainly do not practice what I preach as far as not growing plants which get too large for containers. My 8-foot tall jackfruits would tell you that.