如何在搭载 M1 芯片的 MacBook Pro 上的虚拟机上安装 Docker?

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

How to install a docker on a virtual machine on MacBook Pro with a M1 chip?

问题

我正在进行实习,我的导师告诉我要在虚拟机上安装Docker。
我使用的是搭载M1芯片的MacBook Pro,系统版本是Ventura 13.1。
我该怎么做?

(说实话,我觉得我的导师也不太清楚怎么操作。我只是一名大二学生,想要积累一些经验。我们的对话看起来像这样:
他:在虚拟机上安装Docker,完成后告诉我。
我:这个虚拟机应该使用什么操作系统?是Windows 11 64位ARM吗?
他:在虚拟机上安装Docker,完成后告诉我。
我:什么?应该使用什么操作系统?
他:所以你完成不了任务是吗?
我:???)

我尝试下载VirtualBox,但收到了警告:“检测到不支持的硬件架构!安装程序检测到不支持的架构。VirtualBox仅支持amd64架构。”
所以我尝试下载并配置了VMware,使用了这个教程:
VMware教程
一切都设置好了,我也下载了Docker。但是我无法打开它,我收到了这个警告:Docker Desktop无法检测到超级监视器,必须在BIOS中启用硬件辅助虚拟化和数据执行保护。我也找不到解决方法。

然后我尝试使用Ubuntu虚拟机,按照这篇博客的步骤进行操作:
Docker在macOS上以原生速度使用Ubuntu虚拟机(适用于Intel和Apple Silicon CPU)
但是当我到达这一步:screen /dev/ttys003(我的是ttys001)时,一直失败。
我需要一些帮助...非常感谢!

英文:

I am doing this internship where my supervisor told me to install a docker on a virtual machine.
I am using MacBook Pro with M1 chip Ventura 13.1.
What should I do?

(TBH I don't think my supervisor knows how this works too. I am just a sophomore trying to gain some experience. Our conversation looks like this:
He: Install docker on a virtual machine and let me know when done.
Me: What operating system should this virtual machine has? Is it Windows 11 64-bit Arm?
He: Install docker on a virtual machine and let me know when done.
Me: What?? What OS should it be?
He: So you can't complete the task right?
Me: ????)

I have tried downloading virtual box but it warned me: "Unsupported hardware architecture detected! The installer has detected an unsupported architecture. VirtualBox only runs on the amd64 architecture."
So I tried to download and configured VMware using this tutorial:
vmware tutorial
Everything was set up and I downloaded docker. But I cannot open it, I get this warning: Docker Desktop is unable to detect a hypervisor Hardware assisted virtualization and data execution protection must be enabled in BIOS. I could not find solution to this as well.
Then I tried to use ubuntu virtual machine following this blog: Docker on macOS at native speed using Ubuntu Virtual Machine (both Intel and Apple Silicon CPU) Then when I reached this step: screen /dev/ttys003 (mine was ttys001), it just kept failing.
I need some help...Many thanks!

答案1

得分: 1

当您在Mac上安装Docker Desktop时,它已经在一个Linux虚拟化程序中运行。无需安装额外的虚拟机软件,您绝对不需要Windows 10/11。

如果您想使用Ubuntu,我猜您可以在Mac上使用Multipass

英文:

When you install Docker Desktop for Mac, it already runs in a Linux Hypervisor. There is no need to install additional VM software, and you definitely don't need Windows 10/11

If you wanted to use Ubuntu, I guess you could use Multipaas on a Mac

huangapple
  • 本文由 发表于 2023年6月6日 04:49:10
  • 转载请务必保留本文链接:https://go.coder-hub.com/76409908.html
匿名

发表评论

匿名网友

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

确定