Rediger

SQL Server on Linux containers

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

Security and authentication

High availability

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.

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.