|
| 1 | +// For format details, see https://aka.ms/devcontainer.json. For config options, see the |
| 2 | +// README at: https://github.com/devcontainers/templates/tree/main/src/go-postgres |
| 3 | +{ |
| 4 | + "name": "Go & YDB", |
| 5 | + "service": "sdk", |
| 6 | + "dockerComposeFile": "compose.yml", |
| 7 | + "workspaceFolder": "/workspaces/ydb-go-sdk", |
| 8 | + // Allows the container to use ptrace, which is useful for debugging. |
| 9 | + "capAdd": [ |
| 10 | + "SYS_PTRACE" |
| 11 | + ], |
| 12 | + // Disables seccomp, which can be necessary for some debugging tools to function correctly. |
| 13 | + "securityOpt": [ |
| 14 | + "seccomp=unconfined" |
| 15 | + ], |
| 16 | + // Features to add to the dev container. More info: https://containers.dev/features. |
| 17 | + "features": { |
| 18 | + "ghcr.io/devcontainers/features/github-cli:1": {} |
| 19 | + }, |
| 20 | + // Configure tool-specific properties. |
| 21 | + "customizations": { |
| 22 | + "vscode": { |
| 23 | + "extensions": [ |
| 24 | + "golang.go", |
| 25 | + "VisualStudioExptTeam.vscodeintellicode", |
| 26 | + "redhat.vscode-yaml", |
| 27 | + "zxh404.vscode-proto3", |
| 28 | + "github.vscode-github-actions" |
| 29 | + ] |
| 30 | + } |
| 31 | + }, |
| 32 | + // Use 'forwardPorts' to make a list of ports inside the container available locally. |
| 33 | + "forwardPorts": [2135, 2136, 8765], |
| 34 | + // Use 'initializeCommand' to run commands before the container is created. |
| 35 | + "initializeCommand": "cd \"${localWorkspaceFolder}\" && git config --local user.email \"$(git config user.email)\" && git config --local user.name \"$(git config user.name)\"", |
| 36 | + // Use 'postCreateCommand' to run commands after the container is created. |
| 37 | + "postCreateCommand": "go version && golangci-lint --version && go mod download", |
| 38 | + // Use 'postStartCommand' to run commands after the container is started. |
| 39 | + "postStartCommand": ".devcontainer/configure.sh" |
| 40 | + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. |
| 41 | + // "remoteUser": "root" |
| 42 | +} |
0 commit comments