Server 2016 Docker Install SHA256 verify failed. Deleting file

Expected behavior

Should prompt for restart after installing the Docker package.

Actual behavior

Cannot complete the install due to a SHA256 hash verifications that fails

Information

PS C:\Users\administrator.HOSTMATIC> Install-Package -Name docker -ProviderName DockerMsftProvider -verbose
VERBOSE: Importing package provider ‘DockerMsftProvider’.
VERBOSE: Using the provider ‘DockerMsftProvider’ for searching packages.
VERBOSE: Download size: 0MB
VERBOSE: Free space on the drive: 20572.73MB
VERBOSE: Downloading https://dockermsft.blob.core.windows.net/dockercontainer/DockerMsftIndex.json to
C:\Users\ADMINI~1.HOS\AppData\Local\Temp\DockerMsftProvider\DockerDefault_DockerSearchIndex.json
VERBOSE: About to download
VERBOSE: Finished downloading
VERBOSE: Downloaded in 0 hours, 0 minutes, 1 seconds.
VERBOSE: Performing the operation “Install Package” on target “Package ‘Docker’ version ‘1.12.2-cs2-ws-beta’ from
‘DockerDefault’.”.

The package(s) come(s) from a package source that is not marked as trusted.
Are you sure you want to install software from ‘DockerDefault’?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is “N”): A
VERBOSE: Containers feature is already installed. Skipping the install.
VERBOSE: Verifying Hash of the downloaded file.
WARNING: Cannot verify the file SHA256. Deleting the file.
VERBOSE: Hash verified!
WARNING: C:\Users\ADMINI~1.HOS\AppData\Local\Temp\DockerMsftProvider\Docker-1-12-2-cs2-ws-beta.zip does not exist
Install-Package : Cannot find path ‘C:\Users\ADMINI~1.HOS\AppData\Local\Temp\DockerMsftProvider\Docker-1-12-2-cs2-ws-be
ta.zip’ because it does not exist.
At line:1 char:1

  • Install-Package -Name docker -ProviderName DockerMsftProvider -verbos …
  •   + CategoryInfo          : ObjectNotFound: (C:\Users\ADMINI...cs2-ws-beta.zip:String) [Install-Package], Exception
      + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand,Microsoft.PowerShell.Packag
     eManagement.Cmdlets.InstallPackage
    

Steps to reproduce the behavior

  1. Install Windows Server 2016 Datacenter GUI as trial on Hyper-V (Windows 10)
  2. Winver is 1607 OS Build 14393.693
  3. Fully updated Server 2016 OS
  4. Ran “Install-Module -Name DockerMsftProvider -Repository PSGallery -Force” with success prior to docker install

I’ve also searched for help in this forum but without any success:

This workaround helped me: https://github.com/OneGet/MicrosoftDockerProvider/issues/15#issuecomment-269219021

Hi Valx,

I’ve could’e have sworn that i replicated the same steps with the same SHA256 error as outcome. However i can confirm that your suggestion worked perfectly, and that i am now able to do a “Docker Version”.

Have a great day!

Based on that workaround I have prepared a script with those similar steps: