sudo docker pull microsoft/mssql-server-linux
Run the container image with Docker
To view your Docker active containers (container is an instance of the image)
-a // active containers
docker container ls
To view your docker images
docker container ls
To view your docker images
Remove image
docker rmi -f <image_id>
Remove container (you should stop the container before)
docker stop <id_or_name>
docker rm <id_or_name>
docker start <id_or_name>
========================
sudo npm install -g sql-cli
-f // force
Remove container (you should stop the container before)
docker stop <id_or_name>
Start container after reboot
========================
Test connection with sql-cli
Install sql-cli (Node.js should be installed)sudo npm install -g sql-cli
Connect
mssql -u sa -p YourPassword123
after connection test with the command
select @@version
after connection test with the command
select @@version
Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64)
Nov 30 2018 12:57:58
Copyright (C) 2017 Microsoft Corporation
Developer Edition (64-bit) on Linux (Ubuntu 16.04.5 LTS)
========================
Connect to Database:
Login: sa
Password: YourPassword123
Server: localhost
Server: localhost
No comments:
Post a Comment