How does Docker run a Linux kernel under macOS host?

后端 未结 3 955
甜味超标
甜味超标 2021-02-03 18:21

I installed Docker on my macOS Sierra as follows. Note I don\'t have VirtualBox installed.

brew cask uninstall virtualbox
brew cask install docker
3条回答
  •  我在风中等你
    2021-02-03 18:50

    While the other answers are correct about the hypervisor, they don't answer your specific question.

    The answer is "Docker [Desktop] for Mac" does run a Linux host VM with a replacement for boot2docker - LinuxKit developed and maintained by Docker for the purpose of making lightweight distributions.

    https://blog.docker.com/2017/04/introducing-linuxkit-container-os-toolkit/

    The uname you saw didn't have the keyword in it, but it seems to be included now, e.g. from Docker for Mac 18.03.1 I see:

    Linux a8e079429a51 4.9.87-linuxkit-aufs #1 SMP Wed Mar 14 15:12:16 UTC 2018 x86_64 Linux
    

    You can see links to the included versions on the release pages. https://docs.docker.com/docker-for-mac/release-notes/

    So it's not so different from the old days Docker Machine + VirtualBox + boot2docker,

    for the new days, it's just the provisioning is done internally by "Docker [Desktop] for Mac" and VirtualBox is replaced by Apple's Hyperkit, and the "default VM" is a bit more tucked away.

提交回复
热议问题