Skip to content

Commit

Permalink
Add initial .devcontainer for go.19.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jmhbnz committed Mar 1, 2023
1 parent c6beef8 commit f2bd315
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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": {},
}

0 comments on commit f2bd315

Please sign in to comment.