How to create MAC OSX image?

I am trying Docker for Mac beta now. I have another MAC build machine which has Xcode installed and we use it to compile our iOS app. Ideally we would like to use Docker in our MAC build machine so that we can transfer MAC build machine image to another machine if needed.

I have three questions:

  1. Is there anyway I can create docker base image from that existing MAC build machine which has Xcode installed? If yes, how to create such base image?

  2. If we can not create MAC OSX image, can we invoke compiling from Docker container to host Xcode? If yes, how?

  3. If no to above #1 and #2 questions, what are user cases we can still use Docker for our MAC build environment?

Thanks.

Docker for Mac is currently running in a minimal hypervisor - which is a relatively new framework in OS X, but it’s like a tiny linux virtual machine. Hypervisors run virtual machines like… vmware and viritualbox, but the main difference with docker for mac vs virtual box is that it’s much less overhead, and integrated with the system to much greater extent. You could build a container with hooks and environmental variables that can only run on OS X, hybrid? Even if you could put fit an OS X image or Xcode in a container, it doesn’t fit well with the hypervisor design. But I can see people building very interesting hybrid approaches where the container is interacting with Xcode via a symlinked volume (or something equivalent).

Hi David,

Thank you for your response; would you be able to give an example of how to build an xCode iOS app image onto a docker container? It’s something I’m currently having difficulty with.

Thanks,
-Mat