Skip to content

Instantly share code, notes, and snippets.

@alwell-kevin
Created December 6, 2022 15:03
Show Gist options
  • Save alwell-kevin/fd4c5418f88262004a5222410369a25e to your computer and use it in GitHub Desktop.
Save alwell-kevin/fd4c5418f88262004a5222410369a25e to your computer and use it in GitHub Desktop.
Dev Container that references AZ CLI as a feature
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.112.0/containers/docker-existing-docker-compose
// If you want to run as a non-root user in the container, see .devcontainer/docker-compose.yml.
{
"name": "Beam Dev",
"dockerComposeFile": [
"docker-compose.yml"
],
// The 'service' property is the name of the service for the container that VS Code should
// use. Update this value and .devcontainer/docker-compose.yml to the real service name.
"service": "beam",
// The optional 'workspaceFolder' property is the path VS Code should open by default when
// connected. This is typically a file mount in .devcontainer/docker-compose.yml
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"hostRequirements": {
"cpus": 4,
"memory": "8gb",
"storage": "32gb"
},
// Set *default* container specific settings.json values on container create.
"customizations":{
"vscode": {
"settings": {
"mssql.connections": [
{
"server": "sql",
"database": "Beam",
"authenticationType": "SqlLogin",
"user": "sa",
"password": "@#^!fcIen&*asd",
"emptyPasswordInput": false,
"savePassword": true
}
]
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-dotnettools.csharp",
"ms-mssql.mssql",
"ms-dotnettools.blazorwasm-companion",
"hashicorp.terraform"
]
}
},
"forwardPorts": [ 5000 ],
"onCreateCommand": "bash .devcontainer/on-create.sh ${containerWorkspaceFolder} > on-create.log 2>&1",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/sshd:1": {},
"ghcr.io/devcontainers/features/azure-cli:1": {},
"ghcr.io/devcontainers/features/terraform:1": {}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment