Skip to content

Instantly share code, notes, and snippets.

@adoublef
Last active June 19, 2022 11:13
Show Gist options
  • Save adoublef/f58da148441491133f997140af4935fa to your computer and use it in GitHub Desktop.
Save adoublef/f58da148441491133f997140af4935fa to your computer and use it in GitHub Desktop.
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/containers/go-postgres
{
"name": "Go & PostgreSQL",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"go.toolsManagement.checkForUpdates": "local",
"go.useLanguageServer": true,
"go.gopath": "/go",
"go.goroot": "/usr/local/go"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"golang.Go",
"mtxr.sqltools-driver-pg",
"mtxr.sqltools",
"eamodio.gitlens",
"GitHub.copilot"
]
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [22,5432],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "go version",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
"github-cli": "latest"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment