Install Docker on Windows Server 2016 and bypass SHA256 hash validation error

Installing Windows Container is quite straightforward … except when you have an error message on certain VM (not on every VM) like “Cannot verify the file SHA256. Deleting the file”. After a deep crawl of the web to find a correct way to solve this issue, I found a tons of Github issue answers and blog post that works sometimes but mostly are inaccurate and the package version mentioned is outdated. So I introduce you a method that will keep the process right on board version after version.

The quick start page from Microsoft to install Docker on Windows Server 2016 is here, and it’s well written (although not very useful when having installation error) : https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/quick-start-windows-server

Get the right version and Docker install file

To download the correct version of the package, you’ll have to get the manifest and to look for your version to get the right URL :

  1. Download the manifest file containing every package version : Start-BitsTransfer -Source https://dockermsft.blob.core.windows.net/dockercontainer/DockerMsftIndex.json
  2. In the manifest, copy the right URL to the install ZIP file (in my case I need 17.06.0-ce) :

image

Installation

Once you know what you need (in my case version 17-06-0-ce), follow these steps to make it work :

  • Go to the temp folder where everything happen (don’t forget to replace by your current username) : cd C:\Users\<username>\AppData\Local\Temp\DockerMsftProvider\
  • Download Docker package (don’t forget to replace the URL by the one you copy previously) : Start-BitsTransfer -Source https://dockermsft.blob.core.windows.net/dockercontainer/docker-17-06-0-ce.zip -Destination /docker.zip
  • Rename the file to keep a backup (during the process the file is deleted, you won’t have to download it again) : cp .\docker-17-06-0-ce.zip docker-backup.zip
  • Install Docker package : Install-Package -Name docker -ProviderName DockerMsftProvider -Verbose -RequiredVersion 17.06.0-ce
  • Tada ! Things should be OK, so the final step is to restart the VM to make everything work like a charm : Restart-Computer -Force

Afterworks des communautés MS @Nouméa

L’édition de décembre de l’afterworks des communautés Microsoft aura lieu le Lundi 14 Décembre à 18h dans la petite salle du bout du monde.

12341205_10153829715659711_1896417378656081362_n

Au programme de cet afterwork de Décembre :

- Introduction à DevOps avec Docker for Windows et Hyper-V Container (Julien Chable)

- Windows Nano Server (Sylver Schorgen)

Inscrivez vous sur l’event FB