name: "database" services: mssql: image: "mcr.microsoft.com/mssql/server:2022-latest" container_name: "mssql" restart: unless-stopped ports: - "1433:1433" volumes: - "sqlvolume:/var/opt/mssql" environment: - "ACCEPT_EULA=Y" - "SA_PASSWORD=QmEySFxpgnX2HzsMaeQtgdG6OPGHEnvB" - "MSSQL_PID=Developer" - "MSSQL_COLLATION=Latin1_General_BIN" volumes: sqlvolume:
More information: learn.microsoft.com: Configure SQL Server settings with environment variables on Linux