News for hackers. Stuff that matters.
Re:macOS deprecating scripting language runtimes, including ... by new_realist on Wednesday June 05, 2019 @08:41PM (#20110508)
Does OSX offer reasonable container technology? chroot?
Re:macOS deprecating scripting language runtimes, including ... by pram on Wednesday June 05, 2019 @08:51PM (#20110562)
macOS has a native hypervisor framework, Docker and xhyve uses it.

https://developer.apple.com/documentation/hypervisor https://github.com/moby/hyperkit

Re:macOS deprecating scripting language runtimes, including ... by new_realist on Wednesday June 05, 2019 @09:16PM (#20110697)
A hypervisor is not exactly a container. Definitely not in the Linux sense. It may be more secure, but it is also slower.

Further, there's no decent solution for shipping a macOS container image to run in a VM. Linux, yes, Mac, no.

Finally, good luck getting your virtualized macOS app to interact reasonably with your main OS (no drag and drop, no OpenGL, etc.).

I would rather chroot.

Re:macOS deprecating scripting language runtimes, including ... by markstos on Wednesday June 05, 2019 @09:18PM (#20110708)
How much slower?
Re:macOS deprecating scripting language runtimes, including ... by jackfraser on Thursday June 06, 2019 @12:15AM (#20111530)
Not much slower than, say, Hyper-V or Virtualbox or other hypervisors that live alongside a general purpose desktop OS. Remember, they're using the same Intel chips and VT-d and such as anything else; as long as you have enough CPU power it's going to run fine.

IIRC the Docker implementation for OS X runs a tiny, carefully-configured Linux VM transparently in the background. This isn't that dissimilar from the Windows Subsystem for Linux from a user standpoint.

I've done plenty of Docker work on OS X; the only real weirdness is that you're running Linux in the containers and OS X outside. Eventually, though, before switching completely to a native Linux desktop, I moved deeper into the containers and would barely ever see the OS X command prompt any more.

Re:macOS deprecating scripting language runtimes, including ... by tele_ski on Thursday June 06, 2019 @09:32AM (#20114333)
Our build time on Linux container is 8 minutes, but it's a few hours on macOS using docker containers. I haven't dug into it but the hypervisor seems to be single threading the normally multicore compile.
Re:macOS deprecating scripting language runtimes, including ... by wyufro on Thursday June 06, 2019 @03:44AM (#20112387)
Primarily disk access is a lot slower, even with Hyper-V. Eg. Compilation suffers from this. But tasks that don't use the disk too much shouldn't be that bad.
Re:macOS deprecating scripting language runtimes, including ... by TehCorwiz on Wednesday June 05, 2019 @10:19PM (#20110991)
Measurably slower than a LXC container, but still much faster than a full VM.
Re:macOS deprecating scripting language runtimes, including ... by bpye on Wednesday June 05, 2019 @09:14PM (#20110693)
Qemu has a backend too if I'm not mistaken?
Re:macOS deprecating scripting language runtimes, including ... by AceJohnny2 on Wednesday June 05, 2019 @08:58PM (#20110596)
In other words, nothing serious.

Does anyone actually use Docker on Mac?

Xhyve is more of a proof-of-concept than a production-ready tool.

Re:macOS deprecating scripting language runtimes, including ... by RussianCow on Wednesday June 05, 2019 @09:02PM (#20110625)
> Does anyone actually use Docker on Mac?

What? We use it at work every day for local development, and my previous employer did as well. It has issues, definitely, but they have more to do with Docker than with xhyve.

Re:macOS deprecating scripting language runtimes, including ... by enneff on Wednesday June 05, 2019 @09:08PM (#20110652)
But doesn’t Docker on Mac run a Linux VM? I don’t think it uses any of MacOS’s isolation features.
Re:macOS deprecating scripting language runtimes, including ... by frizkie on Wednesday June 05, 2019 @09:14PM (#20110695)
Re:macOS deprecating scripting language runtimes, including ... by dwaite on Wednesday June 05, 2019 @09:02PM (#20110626)
> Does anyone actually use Docker on Mac?

I use it extensively. It is a desktop product however; it you aren't expected to put a swarm of MacBook pros into production.

Re:macOS deprecating scripting language runtimes, including ... by brianwawok on Wednesday June 05, 2019 @10:42PM (#20111136)
Unless you want to run CD to the App Store? So fun....
Re:macOS deprecating scripting language runtimes, including ... by jackfraser on Thursday June 06, 2019 @12:15AM (#20111537)
Ah, but if the XServe had not died and datacenters had racks of these things, there'd no doubt be a production quality implementation by now. Shame.
Re:macOS deprecating scripting language runtimes, including ... by jen20 on Wednesday June 05, 2019 @09:03PM (#20110635)
Xhyve is but one of the options for fronting hypervisor.framework.

Calling it “not serious” is quite wrong.

Re:macOS deprecating scripting language runtimes, including ... by abhorrence on Wednesday June 05, 2019 @09:01PM (#20110622)
I use Docker on Mac, and know many others who do as well.
Re:macOS deprecating scripting language runtimes, including ... by markn951 on Wednesday June 05, 2019 @09:02PM (#20110628)
I personally know of at least 3 or 4 engineering teams of 30+ developers who use it daily.
Re:macOS deprecating scripting language runtimes, including ... by konart on Thursday June 06, 2019 @08:30AM (#20113866)
>Does anyone actually use Docker on Mac?

Sure, for development tasks.

Re:macOS deprecating scripting language runtimes, including ... by m463 on Wednesday June 05, 2019 @10:04PM (#20110912)
I think apple fundamentally does not understand containers.

All the interesting container stuff is on other platforms.

It might be out of fear, maybe because apple doesn't want macos to be virtualized.

It would be really nice to have say the current xcode in one container and a dev xcode in another. It would be nice to farm work out to a lot of machines.

or a dockerfile like: FROM macos:10.14

RUN installer xcode... RUN xcode-build myproject

Re:macOS deprecating scripting language runtimes, including ... by eropple on Wednesday June 05, 2019 @11:29PM (#20111322)
> I think apple fundamentally does not understand containers.

Given that Apple is (or at least was) one of the biggest users of Mesos in the world and have invited me to interview specifically on the back of the operationalization of containers, I'm guessing that the staggeringly bright programmers they've got probably understand containers.

Just a little hunch, you know?

Re:macOS deprecating scripting language runtimes, including ... by m463 on Thursday June 06, 2019 @01:26AM (#20111838)
The devops guys need to spread the love to the OS group and ship it with the OS.

Maybe it's another "you're not the target market" kind of thing.

The point I'm getting at is that folks on other platforms have lots and lots of options and apple doesn't provide any.

Re:macOS deprecating scripting language runtimes, including ... by saagarjha on Thursday June 06, 2019 @12:57AM (#20111705)
> apple doesn't want macos to be virtualized.

The macOS EULA explicitly allows macOS to be virtualized if you do it on a Mac running macOS.

> It would be really nice to have say the current xcode in one container and a dev xcode in another.

This is the entire point behind xcode-select. I currently have Xcode-beta and Xcode on side-by-side on my machine, and they pretty much coexist.

Re:macOS deprecating scripting language runtimes, including ... by eropple on Thursday June 06, 2019 @11:00AM (#20115182)
Can you run them simultaneously? I've never tried.
Re:macOS deprecating scripting language runtimes, including ... by plorkyeran on Thursday June 06, 2019 @03:35PM (#20118224)
Yes, but there are some issues. For pure macOS development it's usually fine, but anything touching the simulator breaks if multiple versions of Xcode try to use it at the same time. I quickly got in the habit of always exiting Xcode before starting a different version.
Re:macOS deprecating scripting language runtimes, including ... by m463 on Thursday June 06, 2019 @01:30AM (#20111859)
- "allows" not the same as supports.

- I think xcode-select just modifies a .plist.

Re:macOS deprecating scripting language runtimes, including ... by saagarjha on Thursday June 06, 2019 @01:39AM (#20111895)
It changes a symlink at /var/db/xcode_select_link, and all of the development tool stubs that Apple has placed consult this to see which binary to run. This is pretty much the officially supported way to switch between multiple copies of Xcode.
Re:macOS deprecating scripting language runtimes, including ... by toyg on Thursday June 06, 2019 @08:08AM (#20113704)
Containers lose a lot of appeal once you leave the server, and Apple have explicitly abandoned the server market.

They do offer a set of "primitives" for virtualization, which can be hooked into by third-party solutions like Docker if they want to do so.

Re:macOS deprecating scripting language runtimes, including ... by Gaelan on Thursday June 06, 2019 @12:36AM (#20111627)
I imagine you could get pretty far with sandboxing+chroot, but it wouldn’t be docker. You’d definitely be able to prevent stuff in the container from getting out, but I’m not so sure you could reproduce docker’s “VM-like” (I.e. the inside of the container is ~identical to a normal Linux machine, with no need to make stuff compatible) quality.
Re:macOS deprecating scripting language runtimes, including ... by wedn3sday on Wednesday June 05, 2019 @08:44PM (#20110524)
Singularity recently released a (non-fully featured, but still useful) mac version.