Conflict: Save-ContainerImage command with ContainerImage Package Provider
pcgeek86 opened this issue · 2 comments
Output of $PSVersionTable
(from a powershell process):
Name Value
---- -----
PSVersion 5.1.14393.206
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.206
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Output of ipmo Docker; (module Docker).Version.ToString()
(from a powershell process):
Name Version
---- -------
Docker 0.1.0.95
Docker 0.0.0.70
Docker 0.0.0.58
Steps to reproduce the issue:
- Launch an administrative PowerShell Desktop Edition prompt
- Install the Docker PowerShell module, per
README.md
- Run command:
Install-PackageProvider ContainerImage -Force
from this article
What actually happened?:
PS C:\windows\system32> Install-PackageProvider ContainerImage -Force
Install-PackageProvider : A command with name 'Save-ContainerImage' is already available on this system. This module
'ContainerImage' may override the existing commands. If you still want to install this module 'ContainerImage', use
-AllowClobber parameter.
At line:1 char:1
+ Install-PackageProvider ContainerImage -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.Power...PackageProvider:InstallPackageProvider) [Install-Pa
ckageProvider], Exception
+ FullyQualifiedErrorId : CommandAlreadyAvailable,Validate-ModuleCommandAlreadyAvailable,Microsoft.PowerShell.Pack
ageManagement.Cmdlets.InstallPackageProvider
What did you expect to happen?:
The ContainerImage
Package Provider should install successfully, side by side with the Docker PowerShell module.
Additional information:
Cheers,
Trevor Sullivan
Docker Captain
Microsoft MVP: Cloud & Data Center Management
https://trevorsullivan.net
https://twitter.com/pcgeek86
To my knowledge the ContainerImage
package provider has been removed moving (TP5+) forward. You can now use docker pull
to obtain the base images and install them as you would expect through Docker
itself.
@taylorb-microsoft, @swernli, @jstarks - Anyone know anything I don't here? Is this a supported scenario?
@jterry75 @pcgeek86
Justin is correct here... the ContainerImage package provider was for TP4 or earlier hosts, and newer images are not going to be published or discoverable via that infrastructure. You should not use that for package discovery or download, and instead use the docker client directly or use Pull-ContainerImage
from the Docker PowerShell module.