The Laravel News site has a tutorial posted showing the Microsoft SQL Server users out there how to install the drivers and use it in a Laravel application in a Docker environment.
I started a project recently that required that I connect a Microsoft SQL Server database with a Laravel 5.5 application, so I thought I’d document how I install the pdo_sqlsrv module and install the Microsoft drivers for PHP in Docker.
Once you install the driver, you can easily configure Laravel to use a Microsoft SQL Server connection. […] I use Docker with most of my PHP projects – I am releasing a book on using Docker with PHP next week – so I thought I’d show you the recipe for getting a SQL server connection with the PDO driver.
The tutorial includes the Dockerfile required to pull in the drivers and install the PHP, MySQL and basic site to get the system up and running. It breaks down each step and the final result when everything is up and running.