skip to Main Content

I want to ask about cross platform compatibilty of Docker ,means if an application is designed to run in a docker container on windows,then can it run on linux or vice -versa?

2

Answers


  1. Docker was create to run on Linux, so the short answer is yes.

    The Windows version isn’t stable or recommend (Docker for windows). At least not by now.
    “But, Fischer, I use Docker on Windows!” Yes, with WSL (windows subsystem for linux – Some kind of VM), which you can configure to set a memory limit, using the .wsconfig file, and if you look at your Windows Menu you may found a Ubuntu icon, that connects you to the bash.
    Docker is largely used for people that develop software, and today many languanges and frameworks use linux, even Microsoft with .Net runs on Linux.
    Docker was created to resolve one simple issue: "But it works on my machine." So, it means that a container should run on every platform. At least "it works on my computer" lol

    Login or Signup to reply.
  2. I think the question is regarding a Windows application. If that’s the case, a Windows application cannot simply run on Linux containers. For example, .Net Framework doesn’t run on Linux. If an application was targeted for Windows, it needs to run on Windows and in that case only a Windows container can run the application.

    Docker Desktop can run both: Windows containers and Linux containers, just not at the same time. You have to switch the context so Docker Desktop can target either WSL (for Linux) or HCS (for Windows).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search