Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server 2019 in Docker: You can accept the EULA by specifying the --accept-eula command line option

Command

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

docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=123456a@' -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest

docker logs -f 1b2ce04432883df593535157999ae3d2996620155b71e0e1d9fd25e8b2e60628

Document: https://hub.docker.com/_/microsoft-mssql-server

enter image description here

enter image description here

enter image description here

I see my error

SQL Server 2019 will run as non-root by default.

This container is running as user mssql.

To learn more visit https://go.microsoft.com/fwlink/?linkid=2099216.

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.

SQL Server 2019 will run as non-root by default.

This container is running as user mssql.

To learn more visit https://go.microsoft.com/fwlink/?linkid=2099216.

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.

enter image description here

enter image description here

enter image description here

like image 482
Do Nhu Vy Avatar asked Dec 04 '25 05:12

Do Nhu Vy


1 Answers

It is an error in reference document (at https://hub.docker.com/_/microsoft-mssql-server ).

enter image description here

Fix it

Use " " , not ' '

docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=123456a@" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest

Another reference document: https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker?view=sql-server-ver15&pivots=cs1-bash#pullandrun2019

See more at https://github.com/microsoft/mssql-docker/issues/199#issuecomment-346092077

like image 70
Do Nhu Vy Avatar answered Dec 05 '25 23:12

Do Nhu Vy