Created
June 8, 2024 23:25
-
-
Save danielmackay/43cf1644f7b9a30bb5e4653252e4999c to your computer and use it in GitHub Desktop.
SQL Docker DB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
db: | |
environment: | |
ACCEPT_EULA: "Y" | |
SA_PASSWORD: "yourStrong(!)Password" | |
# mssql server image isn't available for arm64 architecture, so we use azure-sql instead | |
image: mcr.microsoft.com/azure-sql-edge:latest | |
# If you really want to use MS SQL Server, uncomment the following line | |
#image: mcr.microsoft.com/mssql/server | |
ports: | |
- 1500:1433 | |
restart: unless-stopped | |
healthcheck: | |
test: ["CMD-SHELL", "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P yourStrong(!)Password -Q 'SELECT 1' || exit 1"] | |
interval: 10s | |
retries: 10 | |
start_period: 10s | |
timeout: 3s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment