Docker for Windows: image operating system "linux" cannot be used on this platform

Whenever I’m pulling containers from “hub.docker.com” for eg:- “docker pull node” or"docker pull selenium/node-chrome"or “docker pull selenium/node-firefox” etc,
I always get “latest: Pulling from library/node
image operating system “linux” cannot be used on this platform” error.

Note: I have already selected “Switch to Windows Containers” present at the bottom of the window screen

Please find my docker version below and info:
PS C:\WINDOWS\system32> docker version
Client:
Version: 1.13.1
API version: 1.26
Go version: go1.7.5
Git commit: 092cba3
Built: Wed Feb 8 08:47:51 2017
OS/Arch: windows/amd64

Server:
Version: 1.13.1
API version: 1.26 (minimum version 1.24)
Go version: go1.7.5
Git commit: 092cba3
Built: Wed Feb 8 08:47:51 2017
OS/Arch: windows/amd64
Experimental: true

INFO:
PS C:\WINDOWS\system32> docker info
Containers: 1
Running: 0
Paused: 0
Stopped: 1
Images: 2
Server Version: 1.13.1
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: l2bridge l2tunnel nat null overlay transparent
Swarm: inactive
Default Isolation: hyperv
Kernel Version: 10.0 14393 (14393.693.amd64fre.rs1_release.161220-1747)
Operating System: Windows 10 Pro
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 11.8 GiB
Name: DIN****
ID: QLUF:HIJ6:B6U3***
Docker Root Dir: C:\ProgramData\Docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: -1
Goroutines: 18
System Time: 2017-02-27T11:40:03.4791032+05:30
EventsListeners: 0
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

Any suggestion on this topic would really help.

Thanks

1 Like

If you want to use Windows Docker containers, then you need to pull and run Windows image variants: docker pull stefanscherer/node-windows:7.6.0-nano

https://hub.docker.com/r/stefanscherer/node-windows/

2 Likes

when you have docker for windows installed on win10 if has 1 modes. windows container mode and linux container mode.
you need to right click and switch to linux containers before you pull your selenium images.

2 Likes

Thank you for your reply!
If you see my Docker Info above, you will see that I have already selected “Windows container mode”. If you have tried pulling selenium hub or chrome image in your system and if its working, then please let me know further how you achieved it.

For me its working on Linux container mode and not Windows container mode.

May be we have to create our own Selenium container which can work on Windows mode. And I’m totally unaware of how to create Selenium image for windows.

Thanks Friism!
Any reference of selenium/hub container or Chrome container which can work on “Windows mode”

I don’t think it will work. Selenium runs full browsers with GUI. Windows containers don’t support GUI apps.

This is a bit Shocking…!! :frowning:

I did say “you need to right click and switch to linux containers before you pull your selenium images.”

thanks, that was my problem

I get this error when I switch: “Failed to switch because your Windows version is not compatible.”

OS Name: Microsoft Windows 10 Pro
Version: 10.0.17134 Build 17134

What should I do?

You need to apply windows updates to get a newer version installed.

Is there an update to Windows 10 Pro beyond ver 1803 and build 17134.165? Cos’ I have this and switching to LCoW says my windows version is not compatible.

with docker for windows you can also use lcow mode:
docker pull --platform linux node

I will try this. In the mean time, switching to “LCoW” on Windows pops up a message saying my windows version is not compatible. Will this “pull” fix this issue?

@hvonb That did not work. Switching Hyper-V off and back on did the trick \shrug.

It shows me same error after switching off Hyper-V

Error: Failed to switch because your Windows version is not compatible.

My operating system version is

image

Docker crashed when I tried to switch to Linux Containers… It is blocking me, what is the resolution?

Unable to stop - The running command stopped because the preference variable “ErrorActionPreference” or common parameter is set to Stop: Service ‘Hyper-V Host Compute Service (vmcompute)’ cannot be started due to the following error: Cannot start service vmcompute on computer ‘.’.

at Docker.Core.Pipe.NamedPipeClient.d__5.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object parameters)
at Docker.Actions.<>c__DisplayClass36_0.b__0()
at Docker.ApiServices.TaskQueuing.TaskQueue.<>c__DisplayClass17_0.<.ctor>b__1()

For the sake of readers finding this in the future (as it’s the first google result for the error in the original post), note that you CAN in fact get Docker Desktop on Windows to permit you to pull or run a Linux container while in Windows Container mode. You need to switch to “experimental mode” in Docker Desktop (done in its settings).

Some will wonder, “why would you want to”, and it’s that this also allows one to run both Windows and Linux containers at once, including within Docker Compose. Perhaps someone wants to front a Linux-based Tomcat container with IIS, or wants to have an ASP.NET app talk to a Linux-based Redis cache.

The point is: if one WANTS to run a Linux container while in Windows container mode, one CAN. But again it is EXPERIMENTAL, and surely some will speak up with reasons they think this is a “crazy idea” for Docker to “even allow it”.

1 Like