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.shPowerShell#
. "$HOME/.docker-devtools/docker-devtools.ps1"
. "$HOME/.docker-devtools/internet/docker-internet-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 |
|---|---|---|
terraform-docker | Terraform (official image) | hashicorp/terraform:latest |
ansible-docker | Ansible | willhallonline/ansible:latest |
ansible-playbook-docker | ansible-playbook | willhallonline/ansible:latest |
pulumi-docker | Pulumi (official image) | pulumi/pulumi:latest |
az-docker | Azure CLI (official image) | mcr.microsoft.com/azure-cli:latest |
aws-docker | AWS CLI (official image) | amazon/aws-cli:latest |
gcloud-docker | Google Cloud CLI (official image) | google/cloud-sdk:latest |
kubectl-docker | kubectl (Bitnami image) | bitnami/kubectl:latest |
k9s-docker | k9s (derailed/k9s image) | derailed/k9s:latest |
kubeadm-docker | kubeadm (kind’s node image; no standalone official kubeadm image exists) | kindest/node:latest |
helm-docker | Helm chart manager (official image) | alpine/helm:latest |
packer-docker | HashiCorp 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, butansible-docker/ansible-playbook-dockeruse/ansible/playbooksandaws-dockeruses/aws. This is cosmetic —$PWDis 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.hclCloud 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 listExport 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