What is docker-php-mssql?
docker-php-mssql provides production-ready Docker images that combine the official PHP Docker images with Microsoft SQL Server drivers. These images eliminate the complex setup process of installing and configuring the ODBC drivers and PHP extensions needed to connect PHP applications to Microsoft SQL Server databases.Key Features
Pre-configured SQL Server Drivers
Microsoft ODBC Driver 18 with sqlsrv and pdo_sqlsrv extensions already installed and configured
Multiple PHP Versions
Support for PHP 8.1, 8.2, 8.3, and 8.4 with both CLI and FPM variants
Rich Extension Set
Includes commonly used extensions: bcmath, ds, exif, gd, intl, opcache, pcntl, redis, and zip
Development Tools
CLI images include Composer, Node.js, npm, and Yarn for complete development workflows
Architecture Variants
Alpine Linux
Lightweight images based on Alpine Linux, ideal for production deployments where image size matters.Debian Bookworm
Standard Debian-based images providing broader compatibility and familiar tooling.Swoole Variants
Specialized Alpine images with the Swoole PHP extension for high-performance async programming.Image Types
CLI Images
CLI Images
Command-line interface images designed for:
- Running scripts and background jobs
- Development and testing
- CI/CD pipelines
- Laravel Artisan, Symfony Console applications
- Composer (latest stable)
- Node.js 22.x
- npm and Yarn
- nano text editor
- pcov for code coverage
FPM Images
FPM Images
FastCGI Process Manager images optimized for:
- Production web applications
- Integration with Nginx or Apache
- High-performance web serving
- Containerized microservices
- Minimal tooling footprint
- Efficient process management
- Ready for orchestration platforms
Available PHP Extensions
All images include these pre-installed and configured extensions:| Extension | Purpose |
|---|---|
| sqlsrv | Native Microsoft SQL Server driver |
| pdo_sqlsrv | PDO driver for SQL Server |
| bcmath | Arbitrary precision mathematics |
| ds | Efficient data structures |
| exif | Image metadata reading |
| gd | Image manipulation |
| intl | Internationalization |
| opcache | Performance optimization |
| pcntl | Process control (CLI only) |
| pcov | Code coverage (CLI only) |
| redis | Redis client |
| zip | Archive manipulation |
Supported Versions
Images are automatically rebuilt and retagged weekly to include the latest upstream PHP updates and security patches.
- PHP 8.4 - Latest stable release
- PHP 8.3 - Current stable version
- PHP 8.2 - Active support
- PHP 8.1 - Security fixes only
- Alpine CLI and FPM variants
- Debian CLI and FPM variants
- Alpine Swoole CLI and FPM variants (8.1-8.4)
