The Docker installer for Windows is now available in an online package repository. They can be found and installed using the Docker provider of PackageManagement (a.k.a. OneGet) PowerShell module. The provider needs to be installed before using it. The following PowerShell cmdlets can be used to install the provider.
Import-Module -Name DockerProvider -Force
Import-Packageprovider -Name DockerProvider -Force
New installation:
Install-Package -Name docker -ProviderName DockerProvider -Verbose
Upgrade to the latest version of docker:
Install-Package -Name docker -ProviderName DockerProvider -Verbose -Update
Once the provider is installed and imported, you can search, download, or install Docker using OneGet PowerShell cmdlets:
- Find-Package
- Save-Package
- Install-Package
- Uninstall-Package
- Get-Package
Register-PackageSource -ProviderName DockerProvider -Name AlternateSource -Location https://contoso.com/metaData.json
Get-PackageSource -ProviderName DockerProvider
Find-Package –providerName DockerProvider
Example 2: Search by version, according to –RequiredVersion, -MinimumVersion, and –MaximumVersion requirements. With –AllVersions parameter, all available versions of Docker installers are returned. Without it, only the latest version is returned.
Find-Package –providerName DockerProvider –AllVersions
Install-Package -Name docker -ProviderName DockerProvider -Verbose
Find-Package –ProviderName DockerProvider | Install-Package -Verbose
You can download and save Docker installer without installation, using Save-Package. This cmdlet accepts pipeline result from the search cmdlets. If you have multiple sources, please provide the source for download.
Example 1: Download and save Docker installer to a directory that matches the wildcard path. The latest version will be saved if you do not specify the version requirements.
Save-Package –ProviderName DockerProvider -Name Docker -Path .\temp -MinimumVersion 1.2.3
Find-package –ProviderName DockerProvider | Save-Package -Path .
Get-Package –ProviderName DockerProvider
Uninstalls Docker from the local machine.
Uninstall-Package -ProviderName DockerProvider -Name dOcKeR -Verbose
Updates current installation of docker with the requested version
Install-Package -Name docker -ProviderName DockerProvider -Verbose -Update
Once docker is installed, you will need to restart the machine
After the machine is restarted, docker service needs to be in the running state
After you have installed the required KB (KB3176936 or higher) you will need to restart the machine
0.1.0.0
Initial release
Bug fixes
Bug fixes
Bug fixes
Public release
Added OS version check instead of KB check
Updated the restart message after install
Update the logging while uninstall
-
- Nuget binaries
-
- Update: KB3176936 or later needs to be installed on your machine
-
- We use BITs for downloading purposes. Currently the following scenarios are not supported by BITs:
- 1.1. Behind a proxy
- 1.2. Powershell Direct
- 1.3. SSH remoting
- Note: Please use WinRM based Powershell Remoting.