Docker Community Forums

Share and learn in the Docker community.

SQL Server for Linux exits (aborts) immediately after start

Docker Desktop (42247) on Mac
macOS Catalina 10.15.2
SQL Server for Linux (2019-CU1-ubuntu-16.04)

Running SQL Server for Linux in Docker Desktop on Mac. Container immediately exits within a few seconds of starting.

Container start:
docker run -d --name sql_server_demo -e ‘ACCEPT-EULA=Y’ -e ‘SA_PASSWORD=SSstrongPwd777’ -e ‘MSSQL_PID=Developer’ -p 1433:1433

Checked log:
docker logs -f containerID
SQL Server 2019 will run as non-root by default.
This container is running as user mssql.
To learn more visit Microsoft
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

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.

As you can see with the docker command above to start the container, I’m using ACCEPT_EULA. I also tried the following for accept-eula, but the container exits before getting the command and new container ID entered.

docker exec -it containerID /opt/mssql-tools/bin/mssql-conf --accept-eula
Error response from daemon: Container containerID is not running

I’m a newbie to Docker, so am I missing something? Does anyone know why the container is exiting immediately?
Thank you!

I was able to resolve my problem. I had a typo in the ‘docker run…’ command.

Instead of ‘ACCEPT-EULA’, it should have been ‘ACCEPT_EULA’. I made this change, and the container started, and continued to run successfully.

Thank you!