What does it do?#
Runs the Go toolchain and golangci-lint inside Docker containers — no local Go install required. Like the Images and AI Tools aliases, this file is not sourced automatically — you need to add it explicitly.
Enabling it#
Bash / zsh#
source ~/.docker-devtools/docker-devtools.sh
source ~/.docker-devtools/go/docker-go-devtools.shPowerShell#
. "$HOME/.docker-devtools/docker-devtools.ps1"
. "$HOME/.docker-devtools/go/docker-go-devtools.ps1"Source the root script first —
docker_alias/Invoke-DockerAliasmust already be defined before this file loads.
Commands#
Commands you can run to use this.
Aliases#
| Alias | Tool | Image |
|---|---|---|
go-docker | Go CLI — build/run/test | golang:alpine |
go-bash-docker | Interactive shell in Go container | golang:alpine |
gofmt-docker | Go formatter (ships with the official image) | golang:alpine |
golangci-lint-docker | golangci-lint — Go meta-linter (official image) | golangci/golangci-lint:latest |
Usage#
# Run tests
go-docker test ./...
# Lint
golangci-lint-docker run ./...The Sources#
GitHub: https://github.com/willhallonline/docker-devtools-aliases