拉取镜像
docker pull mcr.microsoft.com/mssql/server:2019-latest
创建挂载目录
mkdir /data/mssql
为挂载目录设置写入权限
chmod -R 777 /data/mssql
运行容器
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Test12345678@" \ -p 1433:1433 --name sql1 \ -v /data/mssql:/var/opt/mssql \ -e "MSSQL_PID=Developer" \ -e "MSSQL_TCP_PORT=1433" \ -e "MSSQL_TCP_ADDRESS=0.0.0.0" \ -d mcr.microsoft.com/mssql/server:2019-latest
标签:run,1433,mssql,docker,data,MSSQL From: https://www.cnblogs.com/leileichina/p/17207643.html