5

I've always this question and no where I found exact answer:

Is Docker Platform Independent?

I mean, when I generate image in Windows, can I run that image on Linux or MacOS? Or when I generate image on Ubuntu, can I run that image on Windows?

If yes, how? If no, what's the point of saying, docker images can be ran anywhere without worrying about any dependencies?

Please help me with this question

Vasu Youth
  • 323
  • 3
  • 13
  • 2
    Docker doesn't include or simulate an OS kernel. On non-Linux platforms, Docker Desktop includes a Linux virtual machine to run Linux containers, or you can use the Windows Subsystem for Linux. Non-Windows hosts can't run Windows containers. – David Maze Dec 19 '20 at 15:36

1 Answers1

1

"Windows containers" run only on Windows. Windows can, and Mac does, use a Linux hypervisor, so it is dependent on a Linux kernel. For Windows, that means you also need a version that supports emulation.

It's also CPU dependent (or was) as you need to cross-compile x86 images separately from armv6, armv7, etc

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245