Blog Details

image

27 Jan 2024

09

35

Introduction

This documentation shows you how you can configure a SQL Server 2019 Docker container.

Steps:

Start Ubuntu or any Linux

startwsl

Ensure that Docker is installed on your Linux.

Start Docker by following command

sudo systemctl start docker

or

sudo service docker start

startdocker

Verify docker status

sudo service docker status startdocker

Pull SQL Server 2019 Image:

Open a terminal or command prompt and run the following command to pull the SQL Server 2019 Docker image from the official Microsoft Container Registry

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

dockerpull

Run the following command to start a new SQL Server container:

docker run -v mssql-volume -e 'ACCEPT_EULA=Y' -e "SA_PASSWORD=Pass123!" -p 1433:1433 --name sqlserver -d mcr.microsoft.com/mssql/server:2019-latest

dockerrun

Check if the container is running by using the following command:

docker ps

dockerps

To connect to sql server do following

- Open ssms
- enter server name as 127.0.0.1
- username as sa
- password as Pass123!

ssms

Finally you can access sql server in docker.

connected

Join our newsletter!

Enter your email to receive our latest newsletter.

Don't worry, we don't spam

image

Related Articles

image
05 Feb 2024

Embed Youtube video in mdx file.

How to Embed Youtube video in mdx file -by Evan Dangol

image
05 Feb 2024

Get Free Linux Virtual Machine Forever in Cloud.

Comparasion of free tier AWS, Azure and Google cloud virtual machines -by Evan Dangol

image
05 Feb 2024

.Net MAUI, Local Web Api Access From Mobile Phones During Development

How to Access local web api from mobile device -by Evan Dangol