SQL Server Red Hat Container

mssql/rhel/server
Standalone image
Single-stream repository
Microsoft Corp.
2022-preview-rhel-9
Overview

Description

Official images for Microsoft SQL Server on Red Hat containers. Use the following command to pull the SQL Server on Red Hat container.  You can replace docker with podman in the below commands and they should work as is.
 

SQL Server 2025 is now generally available. To get started with SQL Server 2025 container images, please use the following command:

podman pull mcr.microsoft.com/mssql/rhel/server:2025-latest


To get started with SQL Server 2022 container images, please use following command:

podman pull mcr.microsoft.com/mssql/rhel/server:2022-latest


To get started with SQL Server 2019 container images, please use the following command:

podman pull mcr.microsoft.com/mssql/rhel/server:2019-latest


Supported Tags

  • 2025-latest
  • 2025-RC1-rhel-10
  • 2025-RC0-rhel-9.1
  • 2025-CTP2.1-rhel-9.1
  • 2025-CTP2.0-rhel-9.1
  • 2022-latest
  • 2022-CU21-GDR2-rhel-9.1
  • 2022-CU21-GDR2-rhel-8.7
  • 2022-CU21-rhel-9.1
  • 2022-CU21-rhel-8.7
  • 2022-CU20-GDR2-rhel-9.1
  • 2022-CU20-GDR2-rhel-8.7
  • 2022-CU20-GDR1-rhel-9.1
  • 2022-CU20-GDR1-rhel-8.7
  • 2022-CU20-rhel-9.1
  • 2022-CU20-rhel-8.7
  • 2022-CU19-GDR1-rhel-9.1
  • 2022-CU19-GDR1-rhel-8.7
  • 2022-CU19-rhel-9.1
  • 2022-CU19-rhel-8.7
  • 2022-CU18-rhel-9.1
  • 2022-CU18-rhel-8.7
  • 2022-CU17-rhel-9.1
  • 2022-CU17-rhel-8.7
  • 2022-CU16-rhel-9.1
  • 2022-CU16-rhel-8.7
  • 2022-CU15-GDR2-rhel-9.1
  • 2022-CU15-GDR1-rhel-9.1
  • 2022-CU15-rhel-9.1
  • 2022-CU15-GDR2-rhel-8.7
  • 2022-CU15-GDR1-rhel-8.7
  • 2022-CU15-rhel-8.7
  • 2022-CU14-GDR1-rhel-9.1
  • 2022-CU14-GDR1-rhel-8.7
  • 2022-CU14-rhel-9.1
  • 2022-CU14-rhel-8.7
  • 2022-CU13-rhel-9.1
  • 2022-CU13-rhel-8.7
  • 2022-CU12-GDR1-rhel-9.1
  • 2022-CU12-GDR1-rhel-8.7
  • 2022-CU12-rhel-9.1
  • 2022-CU12-rhel-8.7
  • 2022-CU11-rhel-9.1
  • 2022-CU11-rhel-8.7
  • 2022-CU10-GDR1-rhel-9.1
  • 2022-CU10-GDR1-rhel-8.7
  • 2022-CU10-rhel-9.1
  • 2022-CU10-rhel-8.7
  • 2022-CU9-rhel-8.7
  • 2022-CU8-GDR1-rhel-8.7
  • 2022-CU8-rhel-8.7
  • 2022-CU7-rhel-8.7
  • 2022-CU6-rhel-8.7
  • 2022-CU5-rhel-8.7
  • 2022-CU4-rhel-8.7
  • 2022-CU3-rhel-8.7
  • 2022-RTM-CU2-rhel-8.5
  • 2022-RTM-CU1-rhel-8.5
  • 2022-RTM-GDR1-rhel-8.5
  • 2022-RTM-rhel-8.5
  • 2019-latest
  • 2019-CU32-GDR5-rhel-8.7
  • 2019-CU32-GDR3-rhel-8.7
  • 2019-CU32-GDR2-rhel-8.7
  • 2019-CU32-GDR1-rhel-8.7
  • 2019-CU32-rhel-8.7
  • 2019-CU31-rhel-8.7
  • 2019-CU30-rhel-8.7
  • 2019-CU29-GDR1-rhel-8.7
  • 2019-CU29-rhel-8.7
  • 2019-CU28-GDR2-rhel-8.7
  • 2019-CU28-GDR1-rhel-8.7
  • 2019-CU28-rhel-8.7
  • 2019-CU27-rhel-8.7
  • 2019-CU26-GDR1-rhel-8.7
  • 2019-CU26-rhel-8.7
  • 2019-CU25-rhel-8.7
  • 2019-CU24-GDR1-rhel-8.7
  • 2019-CU24-rhel-8.7
  • 2019-CU23-rhel-8.7
  • 2019-CU22-GDR1-rhel-8.7
  • 2019-CU22-rhel-8.7
  • 2019-CU21-rhel-8.7
  • 2019-CU20-rhel-8.7
  • 2019-CU19-rhel-8.5
  • 2019-CU18-GDR1-rhel-8.5
  • 2019-CU18-rhel-8.5
  • 2019-CU17-rhel-8.5
  • 2019-CU16-GDR1-rhel-8.5
  • 2019-CU16-rhel-8.5
  • 2019-CU15-rhel-8.4
  • 2019-CU14-rhel-8.4
  • 2019-CU13-rhel-8.4
  • 2019-CU12-rhel-8.3
  • 2019-CU10-rhel-8
  • 2019-CU9-rhel-8
  • 2019-CU8-GDR1-rhel-8
  • 2019-CU6-rhel-8
  • 2019-CU5-rhel-8
  • 2019-CU4-rhel-8
  • 2019-CU3-rhel-8
  • 2019-CU2-rhel-8
  • 2019-CU1-rhel-8
  • 2019-CU18-GDR1-rhel-7.9
  • 2019-CU18-rhel-7.9
  • 2019-CU17-rhel-7.9
  • 2019-CU16-GDR1-rhel-7.9
  • 2019-CU16-rhel-7.9
  • 2019-CU15-rhel-7.9
  • 2019-CU14-rhel-7.9
  • 2019-CU13-rhel-7.9
  • 2019-CU12-rhel-7.9
  • 2019-CU10-rhel-7.6
  • 2019-CU9-rhel-7.6
  • 2019-CU8-GDR1-rhel-7.6
  • 2019-CU6-rhel-7.6
  • 2019-CU5-rhel-7.6
  • 2019-CU4-rhel-7.6
  • 2019-CU3-rhel-7.6
  • 2019-CU2-rhel-7.6
  • 2019-CU1-rhel-7.6
  • 2019-GA-rhel-7.6
  • 2019-GDR1-rhel-7.6
     

*RHEL7 Container images are based on RHEL7 and RHEL8 Container images are based on Red Hat Universal Based Image 8 (UBI8)

 

How to use this image

 

Start a mssql/rhel/server 2025 instance

podman run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 -d mcr.microsoft.com/mssql/rhel/server:2025-latest

 

Start a mssql/rhel/server instance

podman run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 -d mcr.microsoft.com/mssql/rhel/server:2022-latest

 

Connect to Microsoft SQL Server

 

You can connect to the SQL Server using the sqlcmd tool inside of the container by using the following command on the host:

podman exec -it <container_id|container_name> /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P <your_password>

You can also use the tools in an entrypoint.sh script to do things like create databases or logins, attach databases, import data, or other setup tasks. See this example of using an entrypoint.sh and setup.sql script to create a database.

 

You can connect to the SQL Server instance in the container from outside the container by using various command line and GUI tools on the host or remote computers. See the Connect and Query topic in the SQL Server on Linux documentation.

 

Environment Variables

  • ACCEPT_EULA confirms your acceptance of the End-User Licensing Agreement.
  • MSSQL_SA_PASSWORD is the database system administrator (userid = 'sa') password used to connect to SQL Server once the container is running. Important note: This password needs to include at least 8 characters of at least three of these four categories: uppercase letters, lowercase letters, numbers and non-alphanumeric symbols.
  • MSSQL_PID is the Product ID (PID) or Edition that the container will run with. Acceptable values:

            1) Evaluation (free, no production use rights, 180-day limit)

            2) Enterprise Developer (free, no production use rights)

            3) Standard Developer (free, no production use rights)

            4) Express (free)

            5) Standard (PAID)

            6) Enterprise (PAID) - CPU core utilization restricted to 20 physical/40 hyperthreaded

            7) Enterprise Core (PAID) - CPU core utilization up to Operating System Maximum

            8) I bought a license through a retail sales channel and have a product key to enter.

            9) Standard (Billed through Azure) - Use pay-as-you-go billing through Azure.

            10) Enterprise Core (Billed through Azure) - Use pay-as-you-go billing through Azure.

For a complete list of environment variables that can be used, refer to the documentation here.

 

License

 

By passing the value "Y" to the environment variable "ACCEPT_EULA", you are expressing that you have a valid and existing license for the edition and version of SQL Server that you intend to use. You also agree that your use of SQL Server software running in a Docker container image will be governed by the terms of your SQL Server license.

To specify the edition, use the MSSQL_PID environment variable. Details can be found in the "Environment Variables" section below.

 

SQL Server Developer edition lets developers build any kind of application on top of SQL Server. It includes all the functionality of Enterprise edition, but is licensed for use as a development and test system, not as a production server. SQL Server Developer Edition cannot be used in a production environment. The SQL Server 2017 Developer Edition license terms are located here.

 

Known Issues

 

View other issues on the mssql-docker GitHub Project and Known Issues for SQL Server on Linux - SQL Server | Microsoft Learn.

 

Documentation

 

Microsoft SQL Server on Linux for Docker Engine.
Learn more about the latest release of SQL Server on Linux here.

 

Requirements

  • At least 2GB of RAM. Make sure to assign enough memory to the Docker VM if you're running on Docker for Mac or Windows.
  • Requires the following environment flags
    • ACCEPT_EULA=Y
    • MSSQL_SA_PASSWORD=<your_strong_password>
    • MSSQL_PID=<your_product_id | edition_name> (default: Developer)
  • A strong system administrator (SA) password: At least 8 characters including uppercase, lowercase letters, base-10 digits and/or non-alphanumeric symbols.

Products using this container

Published

Generally Available

Size

1.7 GB

Digest

SecurityTechnical information

General information

The following information was extracted from the containerfile and other sources.

SummaryMicrosoft SQL Server
DescriptionMicrosoft SQL Server
ProviderMicrosoft Corp.
MaintainerRed Hat, Inc.

Technical information

The following information was extracted from the containerfile and other sources.

Repository namemcr.microsoft.com/mssql/rhel9/server
Image version16.0.4075.1
Architectureamd64
Get this image

Using Podman

Use the following command(s) from a system with podman installed and running.

$ podman pull mcr.microsoft.com/mssql/rhel/server:2025-latest

 

Using Docker

Use the following command(s) from a system with docker service installed and running.

$ docker pull mcr.microsoft.com/mssql/rhel/server:2025-latest

 

Quick Start commands to start the application

Start a mssql/rhel/server instance with podman running SQL Server 2025:

podman run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 -d mcr.microsoft.com/mssql/rhel/server:2025-latest

Start a mssql/rhel/server instance with podman running SQL Server 2022:

podman run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 -d mcr.microsoft.com/mssql/rhel/server:2022-latest

Start a mssql/rhel/server instance with docker running SQL Server 2019:

docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 -d mcr.microsoft.com/mssql/rhel/server:2019-latest

 

Learn more on how to use SQL Server Containers

https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker?view=sql-server-ver15&pivots=cs1-bash

Red Hat logoLinkedInYouTubeFacebookTwitter

Platforms

Products & services

Try, buy, sell

Help

About Red Hat Ecosystem Catalog

The Red Hat Ecosystem Catalog is the official source for discovering and learning more about the Red Hat Ecosystem of both Red Hat and certified third-party products and services.

We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2025 Red Hat