SQL Server 2019 on Linux Containers

-> Connect to a Red Hat Enterprise Linux 8 Azure Virtual machine using Putty,

Blog93_1

-> Enable Docker CE Repository,

Sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo

Blog93_2

-> Install Docker CE using dnf command,

sudo dnf list docker-ce
sudo dnf install docker-ce --nobest -y

Blog93_3

Blog93_4

-> After installation, Start and enable docker service,

sudo systemctl start docker
sudo systemctl enable docker
docker --version

Blog93_5

-> Pull the SQL Server 2019 image,

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

Blog93_6

Blog93_7

-> Execute the container,

sudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Pa$$w0rd1*=Pa$$w0rd1*" \
-p 1433:1433 --name jb-prd-sql1 \
-d mcr.microsoft.com/mssql/server:2019-latest

Blog93_8

-> Verify the container,

sudo docker ps -a

Blog93_9

-> Enter the container,

sudo docker exec -it jb-prd-sql1 "bash"

Blog93_10

-> Connect to SQL Server Instance,

/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "Pa$$w0rd1*=Pa$$w0rd1*"

Thank You,
Vivek Janakiraman

Disclaimer:
The views expressed on this blog are mine alone and do not reflect the views of my company or anyone else. All postings on this blog are provided “AS IS” with no warranties, and confers no rights.

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s