Docker Desktop on Mac的架构概述是什么?

huangapple go评论70阅读模式
英文:

What is the (architecture) overview of Docker Desktop on Mac?

问题

我试图理解 Docker Desktop for Mac 的工作原理。具体来说,我想要了解其架构的概述。

"Overview" 页面在 "Getting Started" 指南中有关于通用架构的图像。

然而,这并没有解释 Docker 在 Linux 上(本地运行)和 Docker Desktop 在 Mac 上(在虚拟机中运行)之间的区别。

我会假设情况会看起来有点像这样:

但这是对情况的极度简化,这张图片还有一些遗漏的东西。

Docker Desktop 在 Mac 上的架构是怎样的呢?

我尝试自己拼凑,但在线上有很多不完整或矛盾的信息。通常不清楚提供的信息是与已弃用的 Docker Toolbox、Docker Machine 还是 Docker for Mac 相关,还是与 Docker Desktop on Mac 相关。


[更新]:我在 docker.com 的博客文章(2016 年) 中找到了这个概述,这似乎基本符合我所寻找的,但我不了解足够的 Docker 知识来判断该信息今天是否仍然正确(甚至是否相关)。

英文:

I am trying to understand how Docker Desktop for Mac works. Specifically, an overview of the architecture.

There is an image of the generic architecture on the "Overview" page of the "Getting Started" guide.

Docker Desktop on Mac的架构概述是什么?

However, this does not explain the distinction between Docker on Linux (which runs natively) and Docker Desktop on Mac (which runs inside a Virtual Machine).

I would assume things would look a bit like this:

Docker Desktop on Mac的架构概述是什么?

But this is a gross oversimplification, things are missing from this picture.

How does the architecture of Docker Desktop on mac look?

I've tried piecing things together for myself, but there seems to be a lot of incomplete or conflicting information online. Often it is not clear whether the information given relates to the deprecated Docker Toolbox, Docker Machine or Docker for Mac, or to Docker Desktop on Mac.


[UPDATE]: I came across this overview in a blog post on docker.com from 2016 which seems to be more or less what I am looking for, but I do not know enough of Docker to judge whether that information is still correct (or even relevant) today.

Docker Desktop on Mac的架构概述是什么?

答案1

得分: 2

我不是Docker Desktop内部的专家,但你的朋友是正确的,Docker只能在Linux系统上本地运行,在Windows和macOS上,你需要某种虚拟化技术来提供运行Docker引擎所需的功能。

在Windows上,你可以选择使用Hyper-V或基于WSL2的新后端。

在macOS上,Docker Desktop on Mac 使用不同的组件,特别是HyperKit,这是一个在macOS上构建的虚拟机监控器,使用了最初源自xhyveHypervisor.Framework

请考虑阅读这个相关的SO问题,尽管它是基于Windows的,但我认为它可能会有所帮助。

英文:

I am not an expert in the internals of Docker Desktop but your guest is correct, Docker will only run natively in Linux systems, in Windows and macOS you need some kind of hypervisor technology to provide the necessary capabilities to run the Docker engine.

In Windows, you can choose between using Hyper-V and the new backend based on WSL2.

In macOS, Docker Desktop on Mac uses different components, especially HyperKit, an hypervisor for macOS built using the Hypervisor.Framework originally derived from xhyve.

Please, consider read this related SO question as well, despite the fact it is Windows based I think it could be of help.

答案2

得分: 2

在这个链接中,您可以找到您正在寻找的部分信息,它可以作为您寻找信息的起点。

collabnix.com网站上的图像:

Docker Desktop on Mac的架构概述是什么?

有关MAC Hyperkit的Linux VM配置可以在以下存储库中找到:

https://github.com/linuxkit/linuxkit/blob/master/examples/docker-for-mac.yml

英文:

In this link you can find part of the information you are looking for, it can serve as a starting point for the information you are looking for
https://collabnix.com/how-docker-for-mac-works-under-the-hood/

image from collabnix.com:

Docker Desktop on Mac的架构概述是什么?

the configuration of linux VM for MAC Hyperkit can be found in this repository
https://github.com/linuxkit/linuxkit/blob/master/examples/docker-for-mac.yml

huangapple
  • 本文由 发表于 2023年6月1日 22:37:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/76383059.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定