Docker Compose Yml for mssql server

version: "3.8"
services:
  mssqlserver:
    container_name: sqlserver-new-ssis
    image: mcr.microsoft.com/mssql/server:2022-latest
    ports:
      - 1433:1433
    environment:
      - ACCEPT_EULA=Y
      - MSSQL_SA_PASSWORD=Secret123456
    volumes:
      - ./data:/var/opt/mssql/data
      - ./log:/var/opt/mssql/log
      - ./secrets:/var/opt/mssql/secrets
    restart: always

Make sure to replace <host directory> with the appropriate directory paths on your host machine where you want to persist data, logs, and secrets. Also, ensure that the <YourStrong!Passw0rd> placeholder is replaced with your desired strong password for the SA account.

Save the above content in a file named docker-compose.yml, and then you can run docker-compose up -d in the same directory to start the SQL Server container.