Laravel Sail is a lightweight command-line interface for running Laravel applications using Docker as the underlying containerization technology. It provides a simple way to set up a development environment for Laravel applications that includes all the necessary dependencies and services, such as PHP, Nginx, and MySQL. However, until recently, one of the limitations of Laravel Sail was the lack of support for Microsoft SQL Server, which is a popular database management system used by many enterprise applications.

> Note: this Dockerfile don't add SQL Server container. Only add ODB Driver for SQL Server and PHP Driver for SQL Server, I use an azure DB

  1. Create the alias to sail.

    alias sail='bash vendor/bin/sail'
  2. Build the container with:

    sail up
  3. Publish the Dockerfile:

    sail artisan sail:publish

    This command create a docker directory in your application's root directory.

  4. Customize the Dockerfile: in docker/8.0/ folder open the Dockerfile and add the entries for ODBC Driver for SQL Server and PHP Driver for SQL Server. Check this links:

    Can you take my Dockerfile configuration in the gist:

  5. Check the context for docker-compose.yml and remove or comment the entries for MySQL:

        context: ./docker/8.0
        dockerfile: Dockerfile
            WWWGROUP: '${WWWGROUP}'

    Example in:

  6. Rebuild your application's containers using the build command:

    sail build --no-cache

Check the documentation for Laravel Sail:

>Thank you for read.