Updated devcontainer.

This commit is contained in:
James Wells 2024-04-24 13:48:35 -07:00
parent 685a3eb16a
commit 21a439b105
Signed by: jwells
GPG key ID: 73196D10B8E65666
2 changed files with 19 additions and 11 deletions

View file

@ -1,7 +1,7 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.194.3/containers/go/.devcontainer/base.Dockerfile # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.194.3/containers/go/.devcontainer/base.Dockerfile
# [Choice] Go version: 1, 1.16, 1.17 # [Choice] Go version: 1, 1.16, 1.17
ARG VARIANT="1.20" ARG VARIANT="1.22"
FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT} FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT}
COPY --from=aquasec/trivy:0.38.3 /usr/local/bin/trivy /usr/bin/trivy COPY --from=aquasec/trivy:0.38.3 /usr/local/bin/trivy /usr/bin/trivy

View file

@ -8,7 +8,7 @@
// Update the VARIANT arg to pick a version of Go: 1, 1.16, 1.17 // Update the VARIANT arg to pick a version of Go: 1, 1.16, 1.17
// Append -bullseye or -buster to pin to an OS version. // Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon. // Use -bullseye variants on local arm64/Apple Silicon.
"VARIANT": "1.20-bullseye", "VARIANT": "1.22-bookworm",
// Options // Options
"NODE_VERSION": "none" "NODE_VERSION": "none"
} }
@ -23,14 +23,18 @@
"go.goroot": "/usr/local/go" "go.goroot": "/usr/local/go"
}, },
// Add the IDs of extensions you want installed when the container is created. // Use the same extensions we had on Gitpod plus HCL support.
"extensions": [ "extensions": [
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint",
"golang.Go", "golang.Go",
"GitHub.copilot", "stylelint.vscode-stylelint",
"DavidAnson.vscode-markdownlint",
"Vue.volar",
"ms-azuretools.vscode-docker",
"vitest.explorer",
"GitHub.vscode-pull-request-github", "GitHub.vscode-pull-request-github",
"wholroyd.hcl", "wholroyd.hcl"
"GitHub.vscode-pull-request-github",
"hashicorp.terraform"
], ],
// Use 'forwardPorts' to make a list of ports inside the container available locally. // Use 'forwardPorts' to make a list of ports inside the container available locally.
@ -40,16 +44,20 @@
// Use 'portsAttributes' to set default properties for specific forwarded ports. More info: https://code.visualstudio.com/docs/remote/devcontainerjson-reference. // Use 'portsAttributes' to set default properties for specific forwarded ports. More info: https://code.visualstudio.com/docs/remote/devcontainerjson-reference.
"portsAttributes": { "portsAttributes": {
"9101": { "9101": {
"label": "Prometheus" "label": "Prometheus",
"onAutoForward": "notify"
}, },
"35570": { "35570": {
"label": "Router To Router" "label": "Router To Router",
"onAutoForward": "notify"
}, },
"35571": { "35571": {
"label": "Worker To Router" "label": "Worker To Router",
"onAutoForward": "notify"
}, },
"35572": { "35572": {
"label": "Client To Router" "label": "Client To Router",
"onAutoForward": "notify"
} }
}, },