Magnolias normally grow into quite large shrubs and trees and I don't think even a large pot would be suitable. You might be able to contain it in a large pot for a couple of years but eventually it will need to be planted out in open ground. If you don't do this it will probably eventually wither and die.