-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathdevcontainer.json
More file actions
88 lines (83 loc) · 3.09 KB
/
devcontainer.json
File metadata and controls
88 lines (83 loc) · 3.09 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{
"name": "go-sqlcmd Development",
"dockerComposeFile": "docker-compose.yml",
"service": "devcontainer",
"workspaceFolder": "/workspaces/go-sqlcmd",
"shutdownAction": "stopCompose",
// Configure tool-specific properties
"customizations": {
"vscode": {
"extensions": [
"golang.go",
"ms-mssql.mssql",
"ms-azuretools.vscode-docker",
"GitHub.copilot",
"GitHub.copilot-chat",
"eamodio.gitlens",
"EditorConfig.EditorConfig",
"streetsidesoftware.code-spell-checker"
],
"settings": {
"go.toolsManagement.autoUpdate": false,
"go.useLanguageServer": true,
"go.lintTool": "golangci-lint",
"go.lintFlags": ["--fast"],
"go.testEnvVars": {
"SQLCMDSERVER": "localhost",
"SQLCMDUSER": "sa",
"SQLCMDPASSWORD": "${env:SQLCMDPASSWORD}",
"SQLCMDDATABASE": "master"
},
"mssql.connections": [
{
"server": "localhost,1433",
"database": "master",
"authenticationType": "SqlLogin",
"user": "sa",
"password": "",
"savePassword": false,
"profileName": "sqlcmd-container (use SQLCMDPASSWORD env var)",
"encrypt": "Optional",
"trustServerCertificate": true
}
],
"editor.formatOnSave": true,
"editor.defaultFormatter": "golang.go",
"[go]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
}
},
"terminal.integrated.defaultProfile.linux": "bash"
}
}
},
// Forward the SQL Server port
"forwardPorts": [1433],
"portsAttributes": {
"1433": {
"label": "SQL Server",
"onAutoForward": "silent"
}
},
// Use 'postCreateCommand' to run commands after the container is created
"postCreateCommand": "bash .devcontainer/post-create.sh",
// Environment variables for tests - password must match docker-compose.yml
// This is a development-only container credential, not a production secret.
// For GitHub Codespaces, you can override SQLCMDPASSWORD via Codespaces Secrets.
"remoteEnv": {
"SQLCMDSERVER": "localhost",
"SQLCMDUSER": "sa",
"SQLCMDPASSWORD": "${localEnv:SQLCMDPASSWORD:SqlCmd@2025!}",
"SQLCMDDATABASE": "master",
"SQLCMDDBNAME": "master"
},
// Features to add to the dev container
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"moby": true
},
"ghcr.io/devcontainers/features/github-cli:1": {}
}
}