SQl Server in Docker

  • Home
  • / SQl Server in Docker

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
14 Feb 2024

Deploying a FREE Nodejs Serverless API in Vercel with Zenstack, Prisma and Neon's Free PostgreSQL

Explore the process of deploying a serverless API with Vercel, leveraging Zenstack for Prisma integration, TypeScript for enhanced development, and Neon's complimentary PostgreSQL database for your project. -by Evan Dangol

image
07 Feb 2024

Harnessing Machine Learning to Detect Toxic Comments - Using Calibrated Binary Classification Metrics Module

Unveiling Machine Learning's Power- Detecting Toxic Comments with C# -by Evan Dangol

image
06 Feb 2024

Will gRPC ultimately replace REST Api in future? A simple gRPC using nodejs with Nextjs

It's unlikely that gRPC will entirely replace REST (Representational State Transfer) API in the near future, as both technologies have their own strengths and are suitable for different use cases.gRPC (Google Remote Procedure Call) is a high-performance...