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

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.

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.

OSX Docker Image on OSX Host?

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.

Can I use my GPU from a docker container on a MacBook Pro ? (AMD Radeon GPU)

I would like to run a GPU enabled app (Gazebo) inside a docker container on my MacBook Pro.
I seemed to me, through my research, that about a year ago, Docker released a native Docker app for MacOS.
Before that, Docker used to spawn an entire Linux VM and run the container on top of it.
Now, it apparently uses some native hypervisor framework, making it more optimized and closer to the hardware, changing entirely Docker's approach to containerization on a Mac.
All this is not very clear to me and I am not sure of everything I stated.
Is it now possible to use my macbook pro's GPU from a docker container, and, if yes, how ?
The command line I'm using right now, which works for regular X11 apps but not GPU-enabled apps like Gazebo is:
xhost +
docker run -it -e DISPLAY=$ip:0 -v /tmp/.X11-unix:/tmp/.X11-unix image_name bash
There's still a virtual machine involved.
Docker for Mac uses a virtualization layer called XHyve. It's a lot thinner and more lightweight than VirtualBox or such (emulates fewer peripherals), but it's still virtualization.
PCI passthrough is (theoretically) possible, but you can't pass through your laptop's main GPU and still use it.
Hardware with an IOMMU (and yes, your MacBook Pro has an Intel chipset with such support) can allow a virtualized environment direct access to PCI hardware.
However, you can't cede control of a piece of hardware to a VM and still use that hardware from the host. (Some high-end server network cards work around this by having multiple PCI endpoints, so the host and each guest gets a different endpoint to talk to).
So -- you could get an external Thunderbolt-attached GPU, and it might work... in the future.
The underlying support in Xhyve isn't there yet (as of this mid-2017 writing), and even on KVM (used by a lot of folks doing pioneering work here), there are only limited reports of success (with a specific video card -- the Radeon HD 5850).

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.

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