Docker command completion for PowerShell.
Switch branches/tags
Nothing to show
Clone or download
matt9ucci ModuleVersion = '1.1809.0.181109'
Add completers
* builder management command
* build --progress
* build --secret
* build --ssh
* image build --progress
* image build --secret
* image build --ssh
* import --platform
* swarm init --default-addr-pool
* swarm init --default-addr-pool-mask-length

Remove completers
* build --console
* image build --console

Add '.psm1' to RootModule to publish module by PowerShell Core 6.1
Latest commit 247e55e Nov 8, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
DockerCompletion ModuleVersion = '1.1809.0.181109' Nov 9, 2018
Tests ModuleVersion = '1.1712.0.180226' Feb 25, 2018
LICENSE ModuleVersion = '1.1712.0.180105' Jan 5, 2018 ModuleVersion = '1.1708.0.170929' Sep 28, 2017
demo.gif ModuleVersion = '1.1708.0.170815' Aug 15, 2017

DockerCompletion for PowerShell


Completion for

  • Management commands and subcommands
    • container, image, service, ...
  • Legacy commands
    • create, images, ps, ...
  • Command/Option arguments
    • run [image], container inspect [container], ...
    • --filter [key=value], --logDriver [name], ...

All of the completions are customizable.


  • PowerShell >= 5.0
  • docker cli >= 1.13 in $env:PATH

Quick Start

# Install from PowerShell Gallery
Install-Module DockerCompletion -Scope CurrentUser
# Import
Import-Module DockerCompletion

Less Quick Start (without Install-Module)

DockerCompletion is a "well-formed" module. You can install and import it in the usual manner as follows.


Download and place the DockerCompletion directory and files in $env:PSModulePath.

You can see the paths listed in $env:PSModulePath as follows:

PS C:\> $env:PSModulePath -split ';'
C:\Program Files\WindowsPowerShell\Modules

If your target path is C:\Users\matt9ucci\Documents\WindowsPowerShell\Modules, execute the following commands:

# Uninstall previous version
Remove-Item $HOME\Documents\WindowsPowerShell\Modules\DockerCompletion -Recurse -Force
# Download
Invoke-WebRequest -OutFile
# Unzip the downloaded archive
# Place the unzipped files and directory in $env:PSModulePath
Move-Item master\DockerCompletion-master\DockerCompletion "$HOME\Documents\WindowsPowerShell\Modules"
# Clean up
Remove-Item master -Recurse -Force

$HOME is a PowerShell's automatic variable containing the full path of the user's home directory (in this case C:\Users\matt9ucci).


Execute the following command to check if you can import DockerCompletion:

PS C:\> Get-Module -ListAvailable DockerCompletion

    Directory: C:\Users\matt9ucci\Documents\WindowsPowerShell\Modules

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   1.1708.... DockerCompletion

After the check, execute the following command to import the installed module:

Import-Module DockerCompletion


You can add your own completers and modify default completers with your custom script.

For information about how to write custom scripts, see completers.ps1 and completers4arguments.ps1

To apply your custom script, pass the path as Import-Module's ArgumentList parameter:

Import-Module DockerCompletion -ArgumentList pathto\custom1.ps1, pathto\custom2.ps1

Known Issues

In PowerShell 5.0/5.1, with one dash (-) and double dash (--), completers are not invoked because of a PowerShell's bug. It will be fixed in PowerShell 6.0.

A workaround for this issue is to type a character following - and --. For example, type --a and press tab.


This github repository will be often rebased.