Run SQL script on Ms SQL Server docker container creation
By providing sh -c "/opt/mssql-tools/bin/sqlcmd ...
to the run command you are replacing the command that starts the SQL server in the container with the sqlcmd
command.
The server is not started inside the container. You need to start it first and run your command after it has finished the startup.