If you reversed the commands in the previous example, the container would shut down when the do-my-sql-commands.sh script completes. The following command illustrates this inside a Dockerfile: /usr/src/app/do-my-sql-commands.sh & /opt/mssql/bin/sqlservr All other commands are run in the background. For example, if you want to run a script and start SQL Server, make sure that the SQL Server process is the right-most command. If it exits, the container will shut down. If you do create your own Dockerfile, be aware of the foreground process, because this process controls the life of the container. For more information, see a demo that combines SQL Server and a Node application. It is possible to create your own Dockerfile to create a customized SQL Server container. This article explains how you can configure and customize SQL Server Docker containers, such as persisting your data, moving files from and to containers, and changing default settings. Configure and customize SQL Server Docker containersĪpplies to: SQL Server (all supported versions) - Linux