Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

19.03.0-rc2 SHA256 Mismatch #1158

Closed
rcaunt opened this issue Jul 22, 2019 · 13 comments
Closed

19.03.0-rc2 SHA256 Mismatch #1158

rcaunt opened this issue Jul 22, 2019 · 13 comments

Comments

@rcaunt
Copy link

rcaunt commented Jul 22, 2019

I'm attempting to install Docker 19.03.0-rc2 on Window Server 2019 using:

Install-Package -Name docker -ProviderName DockerProvider -Verbose -RequiredVersion 19.03.0-rc2

This gives me an error:

WARNING: Cannot verify the file SHA256. Deleting the file.

I've downloaded the index file and can see the following:

 "19.03.0-rc2": {
            "date": "2019-06-06T22:48:55.696682",
            "notes": "Docker for Windows Server 2016",
            "sha256": "254378f7ac8c9277bce60952d61ea2714829331c2e73ab0abd9d962fda98ee7d",
            "size": 130197728,
            "url": "https://download.docker.com/components/engine/windows-server/19.03/docker-19.03.0-rc2.zip"
}

Following similar GitHub issues I did a BITS transfer:

Start-BitsTransfer https://download.docker.com/components/engine/windows-server/19.03/docker-19.03.0-rc2.zip -Destination C:\Source\

I then check the hash on the file and can see that it's different:

Get-FileHash -Path C:\source\docker-19.03.0-rc2.zip | Format-List


Algorithm : SHA256
Hash      : 572D7E7DC68044A85C13C46D3A5F81E7B677CC24C97524AE78F13BB03E86EC77
Path      : C:\source\docker-19.03.0-rc2.zip

I've tried copying the file into the Temp folders and installing but I get the same problem (which I expect):

Install-Package -Name docker -ProviderName DockerProvider -Verbose -RequiredVersion 19.03.0-rc2
VERBOSE: Using the provider 'DockerProvider' for searching packages.
VERBOSE: Download size: 0.04MB
VERBOSE: Free space on the drive: 40603.29MB
VERBOSE: Downloading https://download.docker.com/components/engine/windows-server/index.json to C:\Users\XXX\AppData\Local\Temp\DockerProvider\Docker_DockerSearchIndex.json
VERBOSE: About to download
VERBOSE: Finished downloading
VERBOSE: Downloaded in 0 hours, 0 minutes, 0 seconds.
VERBOSE: Performing the operation "Install Package" on target "Package 'Docker' version '19.03.0-rc2' from 'Docker'.".

The package(s) come(s) from a package source that is not marked as trusted.
Are you sure you want to install software from 'Docker'?
[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: C:\Users\XXX\AppData\Local\Temp\DockerProvider\Docker-19-03-0-rc2.zip already exists. Skipping save. Use -Force to overwrite.
VERBOSE: Verifying Hash of the downloaded file.
WARNING: Cannot verify the file SHA256. Deleting the file.
VERBOSE: Hash verified!
WARNING: C:\Users\XXX\AppData\Local\Temp\DockerProvider\Docker-19-03-0-rc2.zip does not exist
@StefanScherer
Copy link
Contributor

Should be fixed now. BTW: Docker 19.03.0 has been released today, so you can use the DockerMsftProvider again.

@peterlayke
Copy link

@StefanScherer Just tried this and still get the error. Server 2016 (not that it should matter).

Can confirm the version is 19.03.0

@StefanScherer
Copy link
Contributor

I've tried the steps shown in https://docs.docker.com/install/windows/docker-ee/ (using the DockerMsftProvider) on a fresh Windows Server 2016 and there was no checksum mismatch. A docker info shows me the engine version 19.03.0

These are the steps I did:

PS C:\> Install-WindowsFeature Containers
PS C:\> Restart-Computer

then after the reboot

PS C:\> Install-Module DockerMsftProvider -Force
PS C:\> Find-Package docker -ProviderName DockerMsftProvider

Name                           Version          Source           Summary
----                           -------          ------           -------
Docker                         19.03.0          DockerDefault    Contains Docker EE for use with Windows Server.

PS C:\> Install-Package docker -ProviderName DockerMsftProvider
PS C:\> Start-Service docker
PS C:\> docker version
Client: Docker Engine - Enterprise
 Version:           19.03.0
 ...
Server: Docker Engine - Enterprise
 Engine:
  Version:          19.03.0
  ...

@peterlayke
Copy link

image

@StefanScherer thanks for looking into this but unfortunately not working for me. Anyone else confirm?

Server is brand new Core OS which hasn't been hardened yet.

@wisamaziz
Copy link

same issue here on windows 2019:

image

@wisamaziz
Copy link

tempsnip

@StefanScherer
Copy link
Contributor

StefanScherer commented Jul 23, 2019

Well, I don't know all the details of the DockerMsftProvider, but it looks like it hasn't downloaded the zip file. When I run it with -Verbose I see the URL of the Docker-19-03-0.zip file.
Can you check the version of the package provider with Get-PackageProvider DockerMsftProvider ? I have 1.0.0.7 installed. If yours is older, try to update it.
You might check temporary files in $env:TEMP\DockerMsftProvider\ folder. Maybe there is a corrupt Docker-19-03-0.zip file in there.

Maybe adding -Force might help to force to download the zip again and then install it.

@clement-cln
Copy link

@StefanScherer I had the same issue on Windows Server 2016, and it does look like there is a corrupt file with a different SHA256 signature that's being downloaded even when using the DockerMsftProvider. The workaround I found was to:

  1. Manually download the 19.03.0 version using Start-BitsTransfer -Source https://dockermsft.blob.core.windows.net/dockercontainer/docker-19-03-0.zip ( I found the url in the DockerDefault_DockerSearchIndex.json file).

  2. I then checked it had the correct SHA256 signature using Get-FileHash -Path /docker-19-03-0.zip -Algorithm SHA256.

  3. Next, I copied it in the C:\Users\YourUserName\AppData\Local\Temp\DockerMsftProvider folder, and renamed it to Docker-19-03-0.zip (It didn't worked with the lowercase d).

  4. Finally, I ran the installation using Install-Package -Name docker -ProviderName DockerMsftProvider, and it was installed !
    I hope this works for you 😄

@StefanScherer
Copy link
Contributor

Thanks @Deweytle for that detail.
This reminds me that I have to use Invoke-WebRequest -UseBasicParsing ... parameter to download files in provision scripts, containers, ...
Without this parameter Invoke-WebRequest sometimes complains with a warning and does not download the file.
So, maybe https://github.com/OneGet/MicrosoftDockerProvider/blob/developer/DockerMsftProvider.psm1#L1577 also needs this parameter?

Are you able to reproduce the problem after uninstalling the package again? Could you adjust C:\Program Files\WindowsPowerShell\Modules\DockerMsftProvider\1.0.0.7\DockerMsftProvider.psm1 and add -UseBasicParsing after Invoke-WebRequest? That would help to find a fix for the problem that many others have.

@rcaunt
Copy link
Author

rcaunt commented Jul 24, 2019

@StefanScherer Many thanks for this. I'll give your modified DockerMsftProvider a go shortly and report back.

@rcaunt
Copy link
Author

rcaunt commented Jul 24, 2019

@StefanScherer The install worked for us using 1.0.0.7 without the need for any modification.

@StefanScherer
Copy link
Contributor

That's good to know @rcaunt

So the general fix is to update the package provider to the latest version available.
This can be done with this command:

Find-PackageProvider DockerMsftProvider | Install-PackageProvider

@rcaunt
Copy link
Author

rcaunt commented Jul 26, 2019

Closing now that 19.03 is GA.

@rcaunt rcaunt closed this as completed Jul 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants