docker container dies after bash command and sql execution

At first docker container boots up fine but soon after the delaye and execution of the schema.sql file, it disconnects and dies.

Maybe there’s something wrong with entry-point.sh or following command line.

command: bash -c "/opt/mssql/bin/sqlservr & chmod +x ./entry-point.sh; ./entry-point.sh"

docker-compose.sql

database:
  image: microsoft/mssql-server-linux:2017-latest
  container_name: database
  ports:
    - 1433:1433
  volumes:
    - /var/opt/mssql
    - ./assets:/assets
  working_dir: /assets
  command: bash -c "/opt/mssql/bin/sqlservr & chmod +x ./entry-point.sh; ./entry-point.sh"
  environment:
    SA_PASSWORD: "Password"
    ACCEPT_EULA: "Y"

entry-point.sh

#!/usr/bin/env bash

#wait for the SQL Server to come up
sleep 10s

#run the setup script to create the DB and the schema in the DB
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Password -d master -i schema.sql

schema.sql

CREATE DATABASE DataDemo;
GO

USE DataDemo;
GO

Source: StackOverflow