Strange behaviour with Docker package on Windows

Hi everyone,

I’m new to Docker on Windows. I’ve been testing it on Windows 2016 and I’ve done the following:

Install-Module -Name DockerMsftProvider -Repository PSGallery
Install-Package -Name docker -ProviderName DockerMsftProvider

After this, I’ve got access to the docker command. At the same time, I’ve also noticed that the Containers feature in Windows is installed automatically. I’ve read some other forums and guides that said this is not necessary so I’m not sure if this should be the case.

Also, if I run

Get-Package -Name docker

in Powershell, I do see a docker package there initially but once I restart the Powershell session or restart the computer, the docker package seems to disappear. There isn’t any problem running docker though, the command is still available and the service is still running. I just find it a little odd and don’t know if this should be the case.

If anyone can provide any insight into this, I would appreciate it.

Thank you.

I was running into the same problem:

Get-Package -Name docker
Get-Package : No package found for 'docker'.

The solution is to import the DockerMsftProvider.

Import-Packageprovider -Name DockerMsftProvider
Get-Package -Name docker | select name

Name
----
docker

I apparently need to read a bit more on how OneGet works…