Reputation: 11
Im new to docker and windows containers. Deploying on-premise solution on windows server 2016 go through this instruction and stuck on Install-Package Docker -ProviderName DockerMsftProvider -Force
WARNING: Cannot find path 'C:\Users\ADM_AG~1\AppData\Local\Temp\DockerMsftProvider\DockerDefault_DockerSearchIndex.json' because it does not exist. WARNING: Cannot bind argument to parameter 'downloadURL' because it is an empty string. WARNING: The property 'AbsoluteUri' cannot be found on this object. Verify that the property exists. WARNING: The property 'RequestMessage' cannot be found on this object. Verify that the property exists. Install-Package : No match was found for the specified search criteria and package name 'Docker'. Try Get-PackageSour to see all available registered package sources. At line:1 char:1
+ CategoryInfo : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], E
ception
+ FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
BUT somehow i've installed Docker
get-service docker
Status Name DisplayName
Stopped docker Docker Engine
start-service docker start-service : Failed to start service 'Docker Engine (docker)'. At line:1 char:1
+ CategoryInfo : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service], ServiceCommandException
+ FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand
docker version Client: Version: 1.12.0-dev API version: 1.24 Go version: go1.5.3 Git commit: 8e92415 Built: Thu May 26 17:08:34 2016 OS/Arch: windows/amd64 An error occurred trying to connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version: open //./pipe/docker_engine: The system cannot find the file specified.
and now I can't download containers and launch Docker
docker images An error occurred trying to connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/images/json: open //./pipe/docker_engine: The system cannot find the file specified.
docker pull mcr.microsoft.com/windows/nanoserver:1809 An error occurred trying to connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/images/create?fromImage=mcr.microsoft.com%2Fwindows%2Fnanoserver&tag=1809: open //./pipe/docker_engine: The system cannot fin d the file specified.
Containers in WindowsFeauture are enabled, TLS 1.2 is enabled, execution policy is not restricted
may it something related what dockerdefault and container image gallery are not trusted? if yes, how to set it are Trusted?
get-packagesource
Name ProviderName IsTrusted Location
test NuGet False https://www.nuget.org/api/v2 PSGallery PowerShellGet True https://www.powershellgallery.com/api/v2 ContainerImageGallery ContainerImage False http://go.microsoft.com/fwlink/?LinkID=746630&clcid=0x409 DockerDefault DockerMsftPro... False https://go.microsoft.com/fwlink/?LinkID=825636&clcid=0x409
Upvotes: 1
Views: 2898
Reputation: 1781
If I were you I would:
Start over by removing docker with:
Option 1 method:
docker ps --quiet | ForEach-Object {docker stop $_}
docker system prune --volumes --all
Uninstall-Package -Name docker -ProviderName DockerMsftProvider
Uninstall-Module -Name DockerMsftProvider
Get-HNSNetwork | Remove-HNSNetwork
Remove-Item "C:\ProgramData\Docker" -Recurse
Option 2, the brute force method:
Stop-Service docker
dockerd --unregister-service
Remove-Item "C:\ProgramData\Docker" -Recurse
Remove-Item "C:\Program Files\Docker" -Recurse
And reboot to a clean system.
# Install Containers feature
Install-WindowsFeature Containers
# RESTART THE SERVER!!!
# Install Docker Module
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
# Install Docker
Install-Package -Name Docker -ProviderName DockerMsftProvider -Force -Confirm:$false
# Start Docker Engine
Start-Service Docker
You should now have a working Docker installation.
docker version
docker info
If you are still having issues executing the test commands above:
Make sure your Windows Firewall is turned off to make sure there is nothing in the way.
Also, make sure the "World Wide Web Publishing Service" is stopped just in case (at least for now).
Update the "PowerShellGet" module with
Install-Module -Name PowerShellGet -RequiredVersion 2.2.5 -Force
Let me know if it finally works.
FYI: Container tags with "1809" are for Windows 2019. So:
mcr.microsoft.com/windows/nanoserver:1809 ==> Windows 2019
mcr.microsoft.com/windows/nanoserver:sac2016 ==> Windows 2016
Important: The Windows container must match the Windows host that it will be running on.
Upvotes: 1