暫無描述

entrypoint.sh 405B

12345678910111213141516
  1. #!/bin/bash
  2. # Start SQL Server in the background
  3. /opt/mssql/bin/sqlservr &
  4. # Wait for SQL Server to start
  5. echo "Waiting for SQL Server to start..."
  6. sleep 15
  7. # Run the database initialization script
  8. echo "Running initialization script..."
  9. /opt/mssql-tools18/bin/sqlcmd -C -S localhost -U sa -P StrongPassw0rd! -i /init-scripts/create-database.sql
  10. # Wait indefinitely to keep the container running
  11. wait