Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
SQL Server on Linux
Containers provide a lightweight and portable way to run SQL Server on Linux. Compared to virtual machines (VMs), containers start faster and simplify lifecycle management while still providing isolation for database workloads.
Why use containers
Containers share the host operating system (OS) rather than running a full guest OS, which reduces overhead and enables faster provisioning. On Linux hosts, you can run SQL Server 2017 (14.x) or later versions as containers. You can run these containers by using Docker or other supported container runtimes, either standalone or managed by an orchestrator.
Containers are well suited for scenarios that require rapid deployment, consistency across environments, and simplified operations:
- Containers start and scale faster than virtual machines.
- A single host OS reduces administrative overhead.
- Identical images produce consistent deployments across development, test, and production.
- A smaller footprint enables higher density on shared infrastructure.
Common use cases include development and testing, CI/CD pipelines, and cloud-native or scalable architectures.
Get started
To begin working with SQL Server on Linux containers, see the following resources:
Install and configure
- Quickstart: Run SQL Server Linux container images with Docker
- Deploy and connect to SQL Server Linux containers
- Configure and customize SQL Server Linux containers
- Install SQL Server Machine Learning Services (Python and R) on Docker
Security and authentication
- Secure SQL Server Linux containers
- Tutorial: Configure Active Directory authentication with SQL Server on Linux containers
High availability
- High availability for SQL Server containers
- How to use distributed transactions with SQL Server Linux containers
- Troubleshoot SQL Server Docker containers
Orchestration
For production deployments, use an orchestrator such as Kubernetes, Azure Kubernetes Service (AKS), or Red Hat OpenShift to manage containers. Orchestrators handle scheduling, scaling, health monitoring, and recovery.
Microsoft provides guidance and tooling for running SQL Server containers on Kubernetes, including supported container images and deployment examples.
- Quickstart: Deploy a SQL Server container cluster on Azure or Red Hat OpenShift
- Quickstart: Deploy a SQL Server Linux container to Kubernetes using Helm charts
- Deploy availability groups on Kubernetes with DH2i DxOperator on Azure Kubernetes Service
Storage considerations
Databases running in containers need persistent storage that exists outside the container lifecycle. On Kubernetes, you typically use persistent volumes and persistent volume claims (PVCs) to provide this storage.
A typical deployment includes:
- A persistent volume to store database files.
- A deployment or StatefulSet that uses the Microsoft SQL Server Linux container image.
- A service or load balancer that provides stable network access.
With this configuration, the orchestrator can automatically restart or replace containers if a node fails, and your data is preserved.