OSX Docker Image on OSX Host? - macos

Im well aware that i cannot run an OSX docker image on a linux or window host because they are totally different operating systems, but is it possible to have a OSX-based Docker image running ON an OSX host?
I would love to be able to utilize this for automating iOS application build processes.

Docker uses Linux kernel to make use of containerisation. Since MacOS uses a different kernel, this is not natively possible.
However, there are some approaches that you could try.

Related

How can I start IntelliJ IDEA remotely as an X Windows application, if the server is Mac?

I had success to start it, but through a Docker container, ugly but works.
The setup is, old mac with good keyboard = X server.
The new mac with broken keys: X11Forwarding yes.
On the server I tried idea, it starts only on the server. No idea.sh in bin.
Downloading a container with linux, setting its DISPLAY, and IntelliJ starts on the other mac.
Can something be done so that the nice IntelliJ app starts on another mac?
I tried remoting (screen sharing, team viewer) and they are too slow to react, even on LAN (the trackpad is the problem, the screen itself and keyboard are snappy).
Also with Docker it is a bit tricky to keep it alive, commit it, be careful not to loose the state (even if the projects are mounted on volumes with host).
Are you aware of a Linux VirtualBox that would be suitable to install Java, Scala & IntelliJ ? Ubuntu? Debian? Rethorical question, I guess either can work. Port forwarding for X11. Somehow I would need 2 forwardings, or maybe it would work the way Docker works, maybe both are bridges and see in the LAN. The Docker container sure seems to directly see the other IP.
Indeed only an OS that communicates over X protocol, such as Linux can be used (via Docker container, Virtual Machine, etc). MacOS uses VNC as protocol.

How to create Mac OS X docker image?

I am new to the docker. I need to create Mac OS X docker image.
is it possible? if Yes, How to create Mac OS X docker image?
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 but containers running on that instance would need to run Linux.

Could I use docker or something similar to deploy windows application?

I am running a game on Windows, and it requires every OS can only run one. And If I want to run more, currently I open vmware and run the game inside. But the problem is it takes too much memory and disk to run a whole another virtual OS. I know docker will reduce this, but it doesn't seem to support Windows.
Am I right? If so, any other solutions?
Docker uses LXC (linux containers) so cannot run a Windows operating system.
You can use docker on Windows using a boot2docker VM, but this is not the same as docker running a Windows operating system (your containers will run unix based operating systems inside the boot2docker VM).
To do what you're after, you'll need to use separate VMs.

Is there an App-V / Docker equivalent for Mac OSX?

Windows has a application-virtualisation tool called App-V.
Linux appears to have a similar tool called Docker.
My question is - is there a Docker equivalent for MacOS X? (ie without having to spin up a Linux virtual machine on VirtualBox?)
There is no strict analog for OS X. If you are against spinning up a virtual Linux machine, your options are:
A simple chroot jail. The jailkit utility can help you out with this.
For your own OS X applications, using App Sandbox to limit the resources your app has access to.
Again, neither of these is just like Docker 0.x, which uses LXC under the covers.
The chroot solution is closer, since it is one of the components that LXC is built on. However, it doesn't provide kernel namespaces or anything like cgroups — both of which are two very important parts of LXC.

Why can't you install docker natively in osx?

I would love to be able to use docker outside of Vagrant in OSX. Right now this is not possible. What are the specific reasons causing it not to be limited for linux installations only?
Docker is just an abstraction & automation layer on top of system-provided containers.
The technical limitation is that OS X does not support operating system-level virtualization, like containers in Linux or jails in FreeBSD (even despite the fact that OS X is a half-blood BSD).
But even despite that, Docker aims to provide an easy way to share container images, and to make sure that any Docker image would work on any Docker-compatible system, they had to limit it only to Linux. (That is probably why Docker doesn't support FreeBSD and friends, which do have containers.)
UPDATE: you can use projects like docker-osx or boot2docker to enjoy Docker on your OS X machine almost seamlessly (both create a Linux virtual machine behind the scenes.)

Resources