Installation mssql-server-linux in the Docker

First, pull the mirror mssql-server-linux

carried outdocker pull microsoft/mssql-server-linux

Second, run container

carried outdocker run --name sqlserver --restart=always -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=@Uat2019' -p 1433:1433 -d microsoft/mssql-server-linux

tips: When you run docker container can add the following parameters to ensure the restart after each docker container service will be automatically restarted: --restart=always
If you have already started, you can use the following command:docker update --restart=always <CONTAINER ID>

Third, the view of the container Ip

docker inspect --format='{{.NetworkSettings.IPAddress}}' 容器ID

Fourth, the use Navicat SQLPro Studio or SQL server connected to the native

tips: If IP can not log in directly using localhost


524470-031782304bc8cd90.png
image.png
Fifth, use other commands

1, the query image,docker search microsoft

Reproduced in: https: //www.jianshu.com/p/fe6964955544

Guess you like

Origin blog.csdn.net/weixin_34121282/article/details/91159386