记一次docker运行mssql报错

  • 时间:2019年04月09日
简介 docker运行mssql-server-linux报错提示The SQL Server End-User License Agreement (EULA) must be accepted before SQL Server can start. The license terms for this product can be downloaded from...

今天尝试在Windows上安装了docker,并尝试装了mssql-server-linux;

过程一切顺利

docker pull microsoft/mssql-server-linux

docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=<YourStrong!Passw0rd>"  -p 1401:1433 -d microsoft/mssql-server-linux

结果运行命令

docker ps -a 

发现并没有运行起来;

然后使用命令

docker logs imageid 

果然出错了

The SQL Server End-User License Agreement (EULA) must be accepted before SQL
Server can start. The license terms for this product can be downloaded from
http://go.microsoft.com/fwlink/?LinkId=746388.

You can accept the EULA by specifying the --accept-eula command line option,
setting the ACCEPT_EULA environment variable, or using the mssql-conf tool.

但是我加过ACCEPT_EULA参数啊,为什么会这样呢?

经过多方查找,终于找到了,解决方法很简单、

把单引号改成双引号

 参考官方文档

完美解决;

end;

Top