官术网_书友最值得收藏!

Setting up DockerCompletion for PowerShell 

If you have ever used command-line completion, you will want to consider installing DockerCompletion for PowerShell. This tool provides command-line completion for Docker commands. It is fairly easy to install. You will need your system set up to allow the execution of the downloaded module. To do this, open a PowerShell command window with Run as Administrator, and issue the following command:

# allow remote signed scripts to run
Set-ExecutionPolicy RemoteSigned

You can now close the Administrator command window and open a normal user PowerShell command window. To install the DockerCompletion module, issue this command:

# install Docker completion
Install-Module DockerCompletion -Scope CurrentUser

And finally, to activate the module in your current PowerShell window, use this command:

# enable Docker completion
Import-Module DockerCompletion

Now you can use the features of command completion for all your Docker commands. This is a great keystroke saver!

Note that the Import-Module command is only active in the current PowerShell command window. If you want to have it available to all future PowerShell sessions, you will need to add the Import-Module DockerCompletion to your PowerShell profile. 

You can easily edit your PowerShell profile (or create a new one if you haven't already) with this command:

# update your user profile to enable docker completion for every PowerShell command prompt
notepad $PROFILE

Enter the Import-Module DockerCompletion command and save the profile. Now your Docker command-line completion feature will be active in all future PowerShell sessions.

主站蜘蛛池模板: 杨浦区| 醴陵市| 怀仁县| 修武县| 江永县| 赣榆县| 伊通| 台中县| 虞城县| 新巴尔虎左旗| 明水县| 嘉峪关市| 尼木县| 远安县| 临西县| 桃江县| 蚌埠市| 康乐县| 方山县| 郴州市| 金昌市| 东乌珠穆沁旗| 拜城县| 兰溪市| 嵊泗县| 镇雄县| 黄浦区| 颍上县| 临桂县| 和静县| 赤城县| 凤台县| 邵阳县| 银川市| 报价| 吉林市| 韶关市| 普安县| 封开县| 元氏县| 南木林县|