Unknown Blob when pulling microsoft/nanoserver

Expected behavior

I expect to pull the image, microsoft/nanoserver on to my computer.

Actual behavior

docker retries downloading the image a number of times and eventually fails with the error message “unknown blob”

Information

Running Windows 10 Pro (all latest updates applied)

A diagnostic was uploaded with id: B133EA9E-4C20-417E-9D0D-DBAFFFBBA6F9/2016-08-12_23-11-38

Client:
Version: 1.12.0
API version: 1.24
Go version: go1.6.3
Git commit: 8eab29e
Built: Thu Jul 28 21:15:28 2016
OS/Arch: windows/amd64

Server:
Version: 1.12.0
API version: 1.24
Go version: go1.6.3
Git commit: 8eab29e
Built: Thu Jul 28 21:15:28 2016
OS/Arch: linux/amd64

Steps to reproduce the behavior

  1. Open power shell
  2. docker pull microsoft/nanoserver
  3. wait (cf62dbf6d334: Retrying in 4 seconds)
  4. docker eventually times out and outputs “unknown blob”

You are using a linux version of the Docker daemon. You have to install the Windows one: https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start_windows_10

2 Likes

Did you find a solution? I have the same error - I’ve just install Docker for Windows onto Windows 10 An.Update and installed required Windows features (Containers and Hyper-V).
“unknown blob”

The problem is that you are not running the server as windows/amd, you need to switch it to a windows container, once you do it you will get this response:

Client:
Version: 1.12.3
API version: 1.24
Go version: go1.6.3
Git commit: 6b644ec
Built: Thu Oct 27 00:09:21 2016
OS/Arch: windows/amd64
Experimental: true

Server:
Version: 1.12.2-cs2-ws-beta
API version: 1.25
Go version: go1.7.1
Git commit: 050b611
Built: Tue Oct 11 02:35:40 2016
OS/Arch: windows/amd64

the important part is highlighted. To switch it in windows, look in the docker app that is running, and there is the option that says " switch to Windows Container".

2 Likes

The problem is that Docker on Windows cannot run both Windows and Linux containers at the same time. The standard download from docker.com just supports Linux containers. If you try to pull or run a windows image, using the Linux server, you will see this error. Same if running the Windows version of Docker and pulling Linux.

It is possible to switch between the two easily enough, as mentioned by @frpb. However, what they neglected to mention is that this capability is not yet (5th Nov 2016) available in the stable download. When you go to the Docker download page, you need to select the beta channel. When you have it installed, just right-click on the Docker icon in the system tray and you will see an option to either “Switch to Linux containers” or “Switch to Windows containers”, depending on which mode you are currently running in.

You can see a demo here:

1 Like

How do you “switch to Windows Container”? I don’t see anything in the above link that shows how to do this?

thanks

Brian

This is available in the beta version of Docker for Windows: https://docs.docker.com/docker-for-windows/#/switch-between-windows-and-linux-containers-beta-feature

Thanks I have switched to the Beta version and switching between Windows
and Linux is now available.

brian

Yes. Works for me ty.
Guys, use the option ‘switch to Windows containers’ (‘new’ version docker) and try pull image again.

Just right click com docker icon and you will see the option '‘switch to Windows containers’.
Update your docker version too.

1 Like

Is this basically Microsoft’s way of making sure you cannot run Windows containers on non-Microsoft Operating Systems?

So, no ability for Linux or OSX machines to run Windows Docker containers without running Windows in a VM, and THEN running Windows Containers in said VM?

No, it’s not. This is due to the way containers work. Docker Windows containers run Windows executables and Windows processes, and so require a Windows kernel and system. For that reason, a Docker Windows container requires a Windows system to run. The reverse situation is also true - a Linux container requires a Linux system to run.

2 Likes

Thanks @friism that solved my problem.


I will just share the steps for how to switch to the ‘Windows containers’ version of Docker daemon.

  • Confirm the Docker for Windows (a desktop app) is running.

  • Now right-click this Docker icon and select Switch to Windows containers… option.

  • Once switched, the menu will then show Switch to Linux containers…


It just takes few seconds to switch to the Windows version.
You are good to go.
and Now retry the pull for that repo :slight_smile:

Thanks for your response mine was running in linux mode but when I switched into windows mode then it resolved the error and now working.

I am using .net 4.5 framework image. It is taking time to download it is downloading total 5 GB around data. It is too big.

3889bb8d808b: Downloading 932.1 MB/4.07 GB
6d4d50238ed1: Download complete 1GB

Hi Michael,

I have production systems running on Windows 7 Enterprise OS. Is there a way to run a windows container on this system with Docker ?
I have installed Docker Toolbox, but I did not find a way to switch Docker to build/run Windows Containers, hence I’m unable to build any windows containers.
1

I was trying to run the Windows Nano Server and build the Windows container from inside of it, but I can’t neither pull or run the microsoft nanoserver from linux based OS (boot2Docker or Debian containers)
Is the Windows 10 or Windows Server 2016 OS host for Docker mandatory to be able to build windows containers or is there any workaround for Windows 7 (like switch to Windows containers or install NanoServer on Windows 7 OS) ?

Thanks,
Slawek

Windows 10 or Windows Server 2016 are required to run native Docker Windows containers

Thanks Michael for your answer,
I think the available solutions for me are:

  • to port our .NET framework apps to .NET Core apps and run them from the default Docker Linux containers without changing the machine OS - Windows 7 Ent or

  • migrate to Windows 10 or Windows Server 2016