Fail to pull Windows Core/Nano Server container images with Docker for Windows ‘unknown blob’

During my last session preparation, I switched Docker for Windows to use Windows containers, to be honest I don’t have use it for some times (my nested virtualized Windows Server 2016 do the job) and I had the following error when downloading the microsoft/nanoserver image : unknow blob

image

The issue may be that your Docker for Windows daemon is not completely switch to Windows container. So execute the following line to switch it : & ‘C:\Program Files\Docker\Docker\DockerCli.exe’ –SwitchDaemon

Then pull your image again and things should work :

image

Fail to run a new ASP.NET Core solution with Docker in Visual Studio 2017

Sometimes you want to make a demo to a good friend of you about Docker support in Visual Studio 2017. So your start Visual Studio 2017, create a blank ASP.NET Core (Docker support enabled), press F5 to run the application but things are not really happening like your want. In my case, I had the following message :

The specified framework ‘Microsoft.NETCore.App’, version ‘1.1.2’ was not found.
  – Check application dependencies and target a framework version installed at:
      /usr/share/dotnet/shared/Microsoft.NETCore.App
  – The following versions are installed:
      1.1.1
  – Alternatively, install the framework version ‘1.1.2’.

The issue comes from the fact that Visual Studio 2017 builds a project based on .NET Core 1.1.2 but your Docker image only supports .NET Core 1.1.1 ‘(see message). Why your image doesn’t support 1.1.2 ? Maybe simply because your image is outdated with no support for 1.1.2. So the trick is quite easy and it consists to execute the pull again the image to force Docker to update the base image :

docker pull microsoft/aspnetcore:1.1

This should solve your issue after several minutes of downloading the updated image layer.