Growing them in containers are a little tricky. They die if they don't like the potting mix. I killed a lot of them along the way, now I use an inert 50/50 peat and perlite mix and feed them with Alaskan fish fertilizer once a week depending on how often it needs water and add Alaskan Bloom during the flowering time. Desert sand and peat 50/50 or Paver sand and peat 50/50 or small size lava rock and peat also works, beach sand is a different animal, it has an alkaline composition with a higher ph.
Mango trees thrive in slightly acidic to neutral soil, with a pH range of 5.5 to 7.5. Keeping the soil within this range ensures optimal nutrient availability and healthy root development.
They can be grown and kept in containers. I recommend dwarf or medium size trees for containers. They don't like manure and compost based potting mixes, but it can be used on top. In addition, the size of the container needs to match the root mass, if the pot is too large, they may not like it. The pot should be upsized as the tree grows until the last size you will keep it in. I think it has something to do with waterlogging the roots in oversized pots.