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.sh

PowerShell#

. "$HOME/.docker-devtools/docker-devtools.ps1"
. "$HOME/.docker-devtools/go/docker-go-devtools.ps1"

Source the root script first — docker_alias / Invoke-DockerAlias must already be defined before this file loads.

Commands#

Commands you can run to use this.

Aliases#

AliasToolImage
go-dockerGo CLI — build/run/testgolang:alpine
go-bash-dockerInteractive shell in Go containergolang:alpine
gofmt-dockerGo formatter (ships with the official image)golang:alpine
golangci-lint-dockergolangci-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

Find out more#