What does it do?#

Provides aliases for infrastructure-as-code CLIs, cloud provider CLIs and Kubernetes tools. 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/internet/docker-internet-devtools.sh

PowerShell#

. "$HOME/.docker-devtools/docker-devtools.ps1"
. "$HOME/.docker-devtools/internet/docker-internet-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
terraform-dockerTerraform (official image)hashicorp/terraform:latest
ansible-dockerAnsiblewillhallonline/ansible:latest
ansible-playbook-dockeransible-playbookwillhallonline/ansible:latest
pulumi-dockerPulumi (official image)pulumi/pulumi:latest
az-dockerAzure CLI (official image)mcr.microsoft.com/azure-cli:latest
aws-dockerAWS CLI (official image)amazon/aws-cli:latest
gcloud-dockerGoogle Cloud CLI (official image)google/cloud-sdk:latest
kubectl-dockerkubectl (Bitnami image)bitnami/kubectl:latest
k9s-dockerk9s (derailed/k9s image)derailed/k9s:latest
kubeadm-dockerkubeadm (kind’s node image; no standalone official kubeadm image exists)kindest/node:latest
helm-dockerHelm chart manager (official image)alpine/helm:latest
packer-dockerHashiCorp Packer (official image)hashicorp/packer:latest

ansible-docker and ansible-playbook-docker share a single community-maintained image (willhallonline/ansible) that ships both binaries; the alias just selects which one runs.

Note: every image here floats on :latest — none are version-pinned. For infrastructure tools like Terraform and Pulumi that can matter for reproducibility, so consider pinning a tag yourself via a wrapper alias if you need repeatable runs.

Mount path inconsistency: most aliases mount your current directory to /app, but ansible-docker/ansible-playbook-docker use /ansible/playbooks and aws-docker uses /aws. This is cosmetic — $PWD is still bind-mounted and used as the working directory in every case — but worth knowing if you’re troubleshooting paths inside the container.

Usage#

# Run a Terraform plan
terraform-docker plan
terraform-docker apply

# Run an Ansible playbook
ansible-playbook-docker site.yml

# Pulumi preview
pulumi-docker preview

# Azure CLI
az-docker account show

# AWS CLI
aws-docker s3 ls

# Google Cloud CLI
gcloud-docker projects list

# List pods with kubectl
kubectl-docker get pods

# Browse the cluster with k9s
k9s-docker

# Check the kubeadm version
kubeadm-docker version

# Install a Helm chart
helm-docker install my-release ./chart

# Build an image with Packer
packer-docker build template.pkr.hcl

Cloud authentication#

None of these aliases mount credential files or forward auth environment variables automatically — you need to pass them through yourself with DOCKER_DEVTOOLS_EXTRA_ARGS.

# AWS — forward existing env vars
DOCKER_DEVTOOLS_EXTRA_ARGS="-e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION" aws-docker s3 ls

# AWS — or mount your existing credentials file
DOCKER_DEVTOOLS_EXTRA_ARGS="-v $HOME/.aws:/root/.aws:ro" aws-docker s3 ls

# Azure — mount the Azure CLI's cached login
DOCKER_DEVTOOLS_EXTRA_ARGS="-v $HOME/.azure:/root/.azure" az-docker account list

# Google Cloud — mount Application Default Credentials
DOCKER_DEVTOOLS_EXTRA_ARGS="-v $HOME/.config/gcloud:/root/.config/gcloud:ro" gcloud-docker projects list

Export DOCKER_DEVTOOLS_EXTRA_ARGS in your shell profile if you want a mount or credential passthrough applied to every invocation.

The Sources#

GitHub: https://github.com/willhallonline/docker-devtools-aliases

Find out more#