Can Mac OS X be run inside Docker? If so, any suggestion as to how?
And would it be running headless, or there would be a possibility to connect to the GUI remotely?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
Docker provides methods for managing OS-level containers and is built on top of Linux's native features for OS-level containerization. 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.
Now that Docker uses libcontainer rather than LXC as its basis, it is possible that porting of libcontainer in the future could one day allow for running Windows and Mac OS Docker containers on those systems respectively, but it would depend on appropriate OS features being available to allow for containerization.
Running an OSX VM in a Docker container is possible. Take a look at https://github.com/Cleafy/sxkdvm for example.