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

Installing Windows Container is quite straightforward (follow https://docs.docker.com/install/windows/docker-ee) … 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.

Update (07/10/2018) : current version is now 18.03.1-ee-2 (=> https://dockermsft.blob.core.windows.net/dockercontainer/docker-18-03-1-ee-2.zip)

Update (07/16/2018) : Microsoft is playing with manifest (labelling latest binaries as ‘TEST’), so files and SHA256 file hash changed over the night. Some installation issues seems better to handle. Stay tuned.

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-17-06-0-ce.zip.bak
  • Copy 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-17-06-0-ce.zip.bak
  • Check the SHA256 Hash : Get-FileHash -Path /docker-17-06-0-ce.zip -Algorithm SHA256
  • 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 computer to make everything work like a charm : Restart-Computer -Force

Le premier Afterworks MS à Koné

La première édition des Afterworks MS en Province Nord se sont déroulés à Koné ce Lundi 07/08. Devant l’engouement des personnes présentes pour ce type d’événement, les Afterworks sur Koné devraient être réitérer avec un contenu plus spécifique (et moins dense) dans une prochaine édition.

Un grand merci à la CCI de Koné pour le prêt de la salle (et pour nous avoir attendu en fin de journée) et pour accompagner ces initiatives communautaires depuis maintenant plus d’un an.

Comme convenu, nous avons pu partager notre expérience et expertise des technologies Office 365, SharePoint 2016, Visual Studio & .NET, Docker et Windows Container.
Si vous avez des questions sur ces technologies, si vous souhaitez savoir comment nous les déployons chez nos clients ou dans nos sociétés, n’hésitez pas à nous contacter.

Speakers : Sylver Schorgen (SF2i) et Julien Chable (NC IT – MVP Office Server et Development)

Les slides des sessions sont disponibles ci-dessous :
• Office 365 : https://fr.slideshare.net/secret/16KvWXBVppVgUG
• Nano Server : https://fr.slideshare.net/…/prsentation-nano-server-ms-afte…
• SharePoint 2016 : https://fr.slideshare.net/…/prsentation-sharepoint-2016-786…
• Visual Studio et .NET Core : https://www.slideshare.net/…/visual-studio-2017-launch-keyn…
• Docker :
https://www.slideshare.net/…/introduction-devops-containari…
https://www.slideshare.net/…/lcosystme-docker-pour-les-dev-…

Image may contain: one or more people, people sitting, table, living room and indoor

Maven Docker build failed with ‘org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375’ on Windows

You can have this kind of error when building a project with Maven and the Docker plugin (by Spotify) :

[INFO] Building image kelios-solutions/annuaire
[INFO] ————————————————————————
[INFO] BUILD FAILURE
[INFO] ————————————————————————
[INFO] Total time: 03:16 min
[INFO] Finished at: 2017-06-29T16:59:30+11:00
[INFO] Final Memory: 32M/78M
[INFO] ————————————————————————
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:1.0.0:build (default-cli) on project annuaire: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.
rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect -> [Help 1]

[ERROR]

On Windows, with Docker for Windows, just check if you have exposed the daemon on port 2375 (in Docker for Windows settings) :

image

And your Maven build should create the Docker image.