Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 897
Vik Avatar asked Nov 27 '16 00:11

Vik


People also ask

Is there Docker image of macOS?

All containers running on a system share the same kernel; Mac OS X does not use the Linux kernel, but rather a mach kernel, so it cannot be run inside a Docker container at this time. You can run Docker on your Mac using a virtual machine, but containers running on that instance would need to run Linux.

Will Docker ever run natively on Mac?

Docker can now be installed as a native Windows or native Mac app, launched and utilized from a system toolbar just like any other packaged application.

Can we install OS in Docker?

You can run both Linux and Windows programs and executables in Docker containers. The Docker platform runs natively on Linux (on x86-64, ARM and many other CPU architectures) and on Windows (x86-64). Docker Inc. builds products that let you build and run containers on Linux, Windows and macOS.

Can a Linux Docker container run on Mac?

Docker for Mac is a native MacOS X application that embeds a hypervisor (based on xhyve), a Linux distribution and filesystem and network sharing that is much more Mac native. You just drag-and-drop the Mac application to /Applications, run it, and the Docker CLI just works.


1 Answers

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.

like image 137
Haoming Zhang Avatar answered Sep 28 '22 02:09

Haoming Zhang