Skip to content

Instantly share code, notes, and snippets.

@agusrichard
Created December 5, 2021 14:31
Show Gist options
  • Save agusrichard/63a5221dbf5f0dc2568f9c5c5e8a54e2 to your computer and use it in GitHub Desktop.
Save agusrichard/63a5221dbf5f0dc2568f9c5c5e8a54e2 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.205.2/containers/go
{
"name": "Go",
"dockerComposeFile": "docker-compose.yaml",
"service": "app",
"workspaceFolder": "/workspace/containerized-dev",
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
// 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",
"sqltools.connections": [{
"name": "Container database",
"driver": "PostgreSQL",
"previewLimit": 50,
"server": "localhost",
"port": 3000,
"database": "containerized_dev",
"username": "postgres",
"password": "postgres"
}],
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"golang.Go",
"mtxr.sqltools",
"mtxr.sqltools-driver-pg"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [3000],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "go version",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode",
"features": {
"git": "latest",
"github-cli": "latest"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment