What does it do?#
Docker DevTools ships a PowerShell (.ps1) implementation alongside the Bash/zsh version, so Windows users (and anyone who prefers PowerShell on macOS/Linux) can run the same containerised tools without WSL or a POSIX shell. This page pulls together everything PowerShell-specific: setup, how the core alias mechanism works, which tool groups are fully ported, and the known gaps versus Bash.
Requirements#
- PowerShell 5.1+ (Windows PowerShell, ships with Windows 10+) or PowerShell 7+ (
pwsh, cross-platform). - Docker installed and running, with
dockeravailable onPATH. - Git, if you want to clone the aliases repo for easy updates (recommended).
Installing#
Clone the aliases repo so you can pull future updates with git pull:
git clone https://github.com/willhallonline/docker-devtools-aliases.git ~/.docker-devtoolsLoading the core aliases#
Add the following line to your PowerShell profile ($PROFILE):
. "$HOME/.docker-devtools/docker-devtools.ps1"Then reload your profile, or open a new session:
. $PROFILEThis sources the core Invoke-DockerAlias function and the fully-ported tool groups that are auto-loaded by the script itself (PHP, JavaScript/CSS, Python, Java). Optional tool groups (Images, AI tools, Internet tools, Go, Rust, Ruby, Linux tools) live in their own .ps1 files and must be dot-sourced separately — see Enabling optional groups below.
How aliases work#
Every Bash alias becomes a PowerShell function of the same name (e.g. node-docker, phpcs-drupal), so command-line usage is identical between the two shells. Under the hood, each function calls a shared Invoke-DockerAlias helper — the PowerShell equivalent of Bash’s docker_alias — which builds and runs the underlying docker run command.
# Bash # PowerShell
stylelint-docker bad.css stylelint-docker bad.css
phpcs-drupal src/ phpcs-drupal src/
node-docker script.js node-docker script.jsInvoke-DockerAlias honours the same runtime configuration environment variables as Bash — DOCKER_DEVTOOLS_TTY, DOCKER_DEVTOOLS_MAP_HOST_USER and DOCKER_DEVTOOLS_EXTRA_ARGS — see Runtime Configuration for details on each. One difference: Invoke-DockerAlias has no --entrypoint support, unlike its Bash counterpart.
Enabling optional groups#
Images, AI tools, Internet tools, Go, Rust, Ruby and Linux tools are not sourced automatically — dot-source each group’s .ps1 file after the core script:
# Images (full parity)
. "$HOME/.docker-devtools/docker-devtools.ps1"
. "$HOME/.docker-devtools/images/docker-image-devtools.ps1"
# AI tools (full parity)
. "$HOME/.docker-devtools/docker-devtools.ps1"
. "$HOME/.docker-devtools/ai/docker-ai-devtools.ps1"
# Internet tools (full parity)
. "$HOME/.docker-devtools/docker-devtools.ps1"
. "$HOME/.docker-devtools/internet/docker-internet-devtools.ps1"
# Go, Rust, Ruby, Linux tools (full parity)
. "$HOME/.docker-devtools/docker-devtools.ps1"
. "$HOME/.docker-devtools/go/docker-go-devtools.ps1"
. "$HOME/.docker-devtools/rust/docker-rust-devtools.ps1"
. "$HOME/.docker-devtools/ruby/docker-ruby-devtools.ps1"
. "$HOME/.docker-devtools/linux/docker-linux-devtools.ps1"Platform support#
Parity between the Bash/zsh and PowerShell implementations, by tool group:
| Group | Bash / zsh | PowerShell |
|---|---|---|
Core (docker_alias / Invoke-DockerAlias) | ✅ | ✅ (no --entrypoint support) |
| PHP (CakePHP, Composer, Drupal, Laravel, PHPCS, WordPress, Yii) | ✅ | ✅ full parity |
| JavaScript / CSS | ✅ | ✅ full parity |
| Python | ✅ | ⚠️ near-full parity — missing ruff-docker and poetry-docker |
| Java | ✅ | ✅ full parity |
| Images | ✅ (9 aliases) | ✅ full parity |
| AI tools | ✅ (4 aliases) | ✅ full parity |
| Internet tools | ✅ (11 aliases) | ✅ full parity |
| Go | ✅ | ✅ full parity |
| Rust | ✅ | ✅ full parity |
| Ruby | ✅ | ✅ full parity |
| Linux tools | ✅ (13 aliases) | ✅ full parity |
If a group shows ❌ or ⚠️ above, use the Bash/zsh version of that group instead (e.g. via WSL) until the PowerShell port catches up.
Testing#
A PowerShell test harness (tests/run_tests.ps1) stubs out Docker and the alias sub-files so no containers are pulled, covering the same scenarios as the Bash harness:
pwsh tests/run_tests.ps1Troubleshooting#
docker-devtools: docker is not installed or not in PATH.
Docker is missing or the daemon is not running. Install Docker Desktop or ensure docker is on your PATH.
A function isn’t recognised (e.g. ruff-docker : The term ... is not recognized)
Check the Platform support table above — the alias may not be ported to PowerShell yet, or you may need to dot-source the optional group’s .ps1 file first.
--entrypoint-style behaviour is needed
Not supported by Invoke-DockerAlias. Use the Bash/zsh version for aliases that rely on --entrypoint.
Profile changes don’t take effect
Make sure you’re editing the right profile file — run $PROFILE to see its path — and reload with . $PROFILE or open a new PowerShell session.
The Sources#
GitHub: https://github.com/willhallonline/docker-devtools-aliases