Add initial .devcontainer for go.19.

When the devcontainer starts it will run make build to ensure compiled binaries are immediately available for use.

I've confirmed make test is also behaving as expected within the devcontainer.

Signed-off-by: James Blair <mail@jamesblair.net>
dependabot/go_modules/go.uber.org/atomic-1.10.0
James Blair 2023-03-03 07:03:25 +13:00
parent c6beef8f0e
commit 9783253788
No known key found for this signature in database
1 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,23 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/go
{
"name": "Go",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/go:1.19-bullseye",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [2379, 2380],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "make build"
// Configure tool-specific properties.
// "customizations": {},
}