Skip to content

Instantly share code, notes, and snippets.

@codequokka
Created January 5, 2024 21:47
Show Gist options
  • Save codequokka/b5939563dad605290be965188dfced7e to your computer and use it in GitHub Desktop.
Save codequokka/b5939563dad605290be965188dfced7e to your computer and use it in GitHub Desktop.
devcontainer for golang
// 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-1.21-bullseye",
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "sh -c \"$(curl -fsLS get.chezmoi.io)\" -- -b \"${HOME}/.local/bin\" -d init --apply codequokka",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "zsh"
}
}
}
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment