How to remove machine dependency for LAMP development using Docker?

Being a developer sooner or later you have to undergo such machine dependency problems while deployment of code on the serverThere are scenarios where you have to work with a team of developers and maybe they use different versions of PHP and MySQL.