-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (33 loc) · 1.08 KB
/
docker-compose.yml
File metadata and controls
35 lines (33 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
services:
devcontainer:
build:
context: .
dockerfile: Dockerfile
volumes:
- ..:/workspaces/go-sqlcmd:cached
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:db
depends_on:
db:
condition: service_healthy
db:
image: mcr.microsoft.com/mssql/server:2025-CU3-ubuntu-22.04
restart: unless-stopped
environment:
ACCEPT_EULA: "Y"
# Password can be overridden via SQLCMDPASSWORD environment variable
SA_PASSWORD: "${SQLCMDPASSWORD:-SqlCmd@2025!}"
MSSQL_SA_PASSWORD: "${SQLCMDPASSWORD:-SqlCmd@2025!}"
MSSQL_PID: "Developer"
volumes:
- mssql-data:/var/opt/mssql
healthcheck:
test: ["CMD-SHELL", "/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P \"$$MSSQL_SA_PASSWORD\" -C -Q \"SELECT 1\" || exit 1"]
interval: 10s
timeout: 5s
retries: 15
start_period: 45s
volumes:
mssql-data: