French transport company CMA CGM has agreed to buy Spanish private railway operator Continental Rail for $ 29.5 million. The parties will close the deal in the fall of 2021.