Ultimate Go development container for Visual Studio Code
- Compatible with
amd64
, andarm64
CPUs kbuley/godevcontainer:alpine
andkbuley/godevcontainer
- Based on Alpine 3.19
kbuley/godevcontainer:debian
- Based on Debian Bookworm Slim
kbuley/godevcontainer:ubuntu
- Based on Ubuntu LTS
- Based on kbuley/basedevcontainer
- Based on either Alpine, Debian, or Ubuntu
- Minimal custom terminal and packages
- See more features
- Go 1.21.5 code obtained from the latest tagged Golang Docker image
- Go tooling integrating with VS code, all cross built statically from source at the binpot:
- Google's Go language server gopls
- golangci-lint, includes golint and other linters
- dlv
⚠️ only works onamd64
andarm64
- gomodifytags
- goplay
- impl
- gotype-live
- gotests
- gopkgs v2
- Terminal Go tools
- Cross platform
- Easily bind mount your SSH keys to use with git
- Manage your host Docker from within the dev container, more details at kbuley/basedevcontainer
- Extensible with docker-compose.yml
- Docker installed and running
- If you don't use Linux or Windows with WSL, share the directory
~/.ssh
and the directory of your project with Docker Desktop
- If you don't use Linux or Windows with WSL, share the directory
- Docker Compose installed
- VS code installed
- VS code remote containers extension installed
-
Setup your configuration files
-
With style 💯
docker run -it --rm -v "/yourrepopath:/repository" kbuley/devtainr:v0.2.0 -dev go -path /repository -name projectname
Or use the built binary
-
Or manually: download this repository and put the .devcontainer directory in your project.
-
-
If you have a .vscode/settings.json, eventually move the settings to .devcontainer/devcontainer.json in the
"settings"
section as .vscode/settings.json take precedence over the settings defined in .devcontainer/devcontainer.json. -
Open the command palette in Visual Studio Code (CTRL+SHIFT+P) and select
Remote-Containers: Open Folder in Container...
and choose your project directory
See the .devcontainer/README.md document in your repository.
This repository is under an MIT license unless indicated otherwise.