简体   繁体   中英

Docker image running a Mac OS X installation

I am using Docker for Mac and wish to create Docker image running a Mac El Capitan with my development env.

I am not finding any resources on this. All I see is Linux installations.

On Linux I saw things as simple as:

FROM sciensa2/docker-java8
RUN apt-get update
RUN apt-get install -y wget unzip libgtk2.0-0:amd64 libxtst6

But what would be the FROM value for OS X to install and run other software?

If you are trying to run Mac OS as the base system in a Docker container, unfortunately there is no way to do it.

Docker container need to use the host machine's Linux Kernel, since Mac OS family is Unix-based operating system, currently Docker cannot simulate a Mac OS in Docker container. Here is a link to explain how container works .

This would be nice, particularly for CI servers:

  1. You can run OSX on QEMU (akin to VirtualBox, emulates the kernel).
  2. You canrun QEMU from a Docker container. I have done this for ARM dev and it works well.
  3. So yes, you can run OSX from Docker, but you have to emulate, use a virtual machine in the container.

如果您的主机上有硬件虚拟化 ( KVM ),您现在可以使用Docker-OSX通过OSX-KVM在 QEMU/KVM 上运行/模拟 macOS。

There is now an ongoing discussion in the containerd project.

The discussion is focused on how to find a solution to integrate some level of support for MacOS.

The future is now!

Run Mac OS X in Docker with near-native performance. https://github.com/sickcodes/Docker-OSX

For anyone else who came here, there are apparently some guys who managed to do this and open-sourced their project.

Link = https://github.com/sickcodes/Docker-OSX

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM