


Apple Quietly Launches Container On GitHub To Bring Linux Development To macOS (nerds.xyz) 59
BrianFagioli shares a report from NERDS.xyz: Apple has released a new developer tool on GitHub called Container, offering a fresh approach to running Linux containers directly on macOS. Unlike Docker or Podman, this tool is designed to feel at home in the Apple ecosystem and hooks into frameworks already built into the operating system. Container runs standard OCI images, but it doesn't use a single shared Linux VM. Instead, it creates a small Linux virtual machine for every container you spin up. That sounds heavy at first, but the VMs are lightweight and boot quickly. Each one is isolated, which Apple claims improves both security and privacy. Developers can run containerized workloads locally with native macOS support and without needing to install third-party container platforms.
Oh Apple (Score:4, Insightful)
Re: Oh Apple (Score:5, Insightful)
You have no idea what you're talking about.
Re: (Score:1)
And some sock-pupet moderator dishonesty does not change that at all.
Re: (Score:2)
meh. get over it. your argument was kind of crap
Re: Oh Apple (Score:2)
Re:Oh Apple (Score:5, Interesting)
Containers because containers are lightweight and efficient.
You laugh, but here I have a business critical service which is currently running on Solaris on SPARC. It's 16 years old, to give you some perspective on the architecture: tightly coupled C/C++ processes using shared memory IPC and Oracle RDBMS as backing storage, with app-layer caching.
Across all environments, the legacy system consists of 8 servers and 168 CPU cores. It could do with a bit more metal, but it's coping OK.
The Linux x86 containerised solution about to replace it comprises 55 servers, 3,500 CPU cores - and the vendor reckons it will need another 30% more hardware on top of that to cater to some requirements they did not fully appreciate during the RFP process.
Containerisation, folks.
Re: Oh Apple (Score:2)
Re: (Score:2)
The problem there isn't the technology, it's the same old idiots in management that listen to consultants peddling the latest shiny. Containers have their uses, and so do bare metal solutions.
Reading between the other poster's lines, the path from 168 CPUs to 3500 CPUs runs straight through "let's rewrite everything as microservices".
I get you though, it's not containers ... but it is the containerization.
Re: Oh Apple (Score:1)
Re: (Score:2)
You laugh, but here I have a business critical service which is currently running on Solaris on SPARC.
You're a brave person, to post those two words out of the gate. The Larry-hate is strong here and engenders idiocy in what might otherwise be rational people. They rag Redmond too but tolerate that crap because, you know, muh games. Meanwhile the devs still chasing Sun.
Re: (Score:2)
Re: (Score:2)
Correct. In most ways the legacy environment is much more capable.
Re: (Score:2)
I replaced it with 2 containers (for the App itself) running on a 2 VM cluster mounting from our ceph cluster (standard enterprise service) and a containerized postgresql cluster (standard enterprise service). Two week ha
Re: (Score:2)
Nice! I wish I had had that luxury.
Re:Oh Apple (Score:5, Funny)
They could have called them Apple Crates.
Re: Oh Apple (Score:1)
Re: (Score:2)
Only Apple would create multiple virtual machines and call then Containers. I just know in a few months I've going to hear some Apple fanboi brag that they don't use virtual machines anymore, they use Containers because containers are lightweight and efficient. And the reality distortion field grows stronger.
A container is just a disk image and a sandboxed process. When the image contains x86-64 ELF binaries expecting to make Linux syscalls, how are you going to run that on a different kernel, on an ARM processor. There are some very sophisticated ways of doing that, translating the instruction sets like Apple's Rosetta, emulating a foreign kernel interface like Microsoft's WSL1, and _they_ certainly could put all that together, for laughable definitions of "lightweight" and "efficient", but _you_ would use a v
There is no proper, canonical definition (Score:2)
2008 called (Score:2, Funny)
And " will this match the new windows vista glassy look?"
Apple Virtualization runs GUI Linux (Score:4, Interesting)
And asked " what have you poor bastards been doing for 17 years ?"
Apple Virtualization Framework has run Linux distros for many years. Console on Intel. GUI on Apple Silicon (ARM). These were mostly for testing. Launching a fresh copy of Linux each time.
Apple has also been a popular Linux development platform far before that too. Most "Linux" software is really POSIX, not Linux specific. It builds and runs just fine on Macs. Many Linux devs switched to MacBook Pro for their development systems. Got things working in Apple's native Unix environment, then tested on Linux once things seemed working. Which is where Apple Virtualization comes in. Not only does most "Linux" code build fine on Mac, many of the popular FOSS apps also provide pre-built binaries for macOS.
Apple also contributed source code to BSD projects its uses. Which Linux is free to pilfer from.
And " will this match the new windows vista glassy look?"
Windows Vista (2006) copied Apple Aqua (2000).
Re: (Score:2)
I see you can get vmware and virtualbox for apple
Apple seems late to the virtualization party.
Yeah, but the glassy look that windows ripped off from apple, it's kind of sad to see, apple re releasing their own copied de
Re: (Score:2)
So I get the impression the container thing is neither a hypervisor nor some kind of management interface like... virtmanager or virtualbox? Or... I think someone below said it's close to windows subsystem for linux?
Apple Virtualization Framework, introduced into macOS in 2020. It allows code to create and run low overhead macOS and Linux VMs.
"Virtualization"
https://developer.apple.com/do... [apple.com]
"Running Linux in a Virtual Machine"
https://developer.apple.com/do... [apple.com]
Re: (Score:2)
No, Apple is not late.
You are late in comprehension ...
Re: (Score:2)
Yeah, shocker - we've been using Docker (now Docker Desktop, although I believe there's a free version that doesn't have the GUI).
Honestly, Linux development on Mac isn't hard - install Docker, spin up a Linux container and you're good. If anything, the different CPU architecture is the biggest pain in the backside because you need two sets of containers and two sets of binaries (if you're compiling).
Re: (Score:2)
Yeah, shocker - we've been using Docker (now Docker Desktop, although I believe there's a free version that doesn't have the GUI).
Honestly, Linux development on Mac isn't hard - install Docker, spin up a Linux container and you're good. If anything, the different CPU architecture is the biggest pain in the backside because you need two sets of containers and two sets of binaries (if you're compiling).
But you see: Docker is controlled by Microsoft.
Now it makes sense, eh?
Re: (Score:2)
Is it? 10 seconds on Google and the AI says it isn't, but I can't immediately see anything that confirms either way after that.
Re: (Score:2)
Is it? 10 seconds on Google and the AI says it isn't, but I can't immediately see anything that confirms either way after that.
Duh!
Senior moment!
I was thinking of Visual Studio Code!
Sorry.
Good luck with the pathetic 8GB of RAM (Score:1)
8GB ought to be enough for every one - Tim Gates (Score:1)
"Power Users" know to upgrade RAM (Score:2)
"Power Users" know to upgrade RAM. It's the best thing you can do to improve performance and longevity of the hardware. PC or Mac.
Re: (Score:2)
Re: (Score:2)
Pay double the regular price to run a VM. What for?
Well it's not double. And while it does let one system cover three platforms (macOS, Linux and Windows), and provide more RAM for any more technical RAM hungry applications you might run. It also adds years to the useful life of a machine, postponing the need for a replacement.
Re: (Score:2)
Re: (Score:2)
RAM cost $/GB is more than double.
So you are saying 2x the RAM costs 2x the $, that the first x and the second x cost the same?
Obviously you think it's not pathetic enough.
No I was thinking total cost of the laptop, since we are talking about the performance of the laptop and the lifespan of the laptop.
So you added Windows, on ARM MAC! It is certainly not for home use, not for business either.
It's probably one of the better Windows ARM systems out there on an M4 CPU. So there are no software developers in home offices, or in business offices?
You are just asking for trouble :)
In the early adopter sense, absolutely yes. But that's the price of software development. :-)
CPU upgrades can improve RAM speed ... (Score:2)
Maybe someone glanced over the list of available MacBook Pro models and assumed the listed memory was not configurable
It's a mess looking at Apple options. Sometimes to get to the desired amount of RAM you have to also get a CPU upgrade. That might be an upgrade increasing the number of cores in the same CPU, or it might be an upgrade to a different model of CPU. In the latter case that might have additional benefits like the bus speed of the RAM being much higher. 120GB/s in M4, 273GB/s in M4 Pro, and 410GB/s in M4 Max.
Unfortunately, you have to dig through the tech specs link and play with build to order options to f
Re: (Score:2)
Re: (Score:2)
I have 8GB on my Macs and 8GB on this Acer.
A few hundred tabs are no problem.
I guess you have a xxx movie in each of your tabs running?
Re: (Score:2)
16GB is the base RAM for all new Macs.
Re: (Score:2)
Even 16GB RAM is going to be miserable.
All 2024 and newer Macs start with 16 GB, minimum.
And nearly anyone intending to do more than email, browsing, and "Office" Apps went for 16 GB, minimum, anyway.
Potentially interesting given the constraints (Score:5, Interesting)
That process is responsible for talking to things outside the VM, and for launching the container, etc. When the container process exits, vminitd exits and shuts down the VM. Starting the VM takes ~100ms, and the amount of memory and CPU cores it gets are taken directly from the container configuration. So, it's not terrible in terms of memory usage. It's sort of ideal for short-lived containers, since it starts up so fast and only uses as much memory as the container ends up actually allocating (not what it asked for). I'm not sure how they manage to boot Linux in a VM that fast, honestly. Maybe they have a pickled pre-booted image ready to be mapped into memory so they can tell Linux it's just woken up from being suspended? I have read some of the documentation, but I haven't dug into the code yet.
Meanwhile, it uses Rosetta2 to execute x86 code, so you can both build and run multi-platform containers.
I don't know that I'll actually use it myself, since Rancher Desktop is pretty slick, and I need Kubernetes. But, maybe someone will get k3s working on this and I can get away from having to run a big VM all the time. In any case, it's nice to see Apple recognizing how many people use their machines to build Linux containers, and it's nice to see them making it open source while they're at it. It isn't perfect, but it's at least somewhat clever.
Creating Linux VM using Apple Virtualization .... (Score:4, Informative)
I'm not sure how they manage to boot Linux in a VM that fast, honestly..
See Apple Virtualization framework. It's part of macOS. Under Intel Macs it quickly starts up fresh console base Linux VMs. Under Apple Silicon (ARM) Macs, GUI based Linux VMs.
"The Virtualization framework provides high-level APIs for creating and managing virtual machines (VM) on Apple silicon and Intel-based Mac computers. Use this framework to boot and run macOS or Linux-based operating systems in custom environments that you define. The framework supports the Virtual I/O Device (VIRTIO) specification, which defines standard interfaces for many device types, including network, socket, serial port, storage, entropy, and memory-balloon devices."
https://developer.apple.com/do... [apple.com]
"Configure the Sample Code Project
Before you run the sample program:
Download a Linux kernel image.
Download an initial RAM disk image to load into memory.
You may obtain a kernel image and the corresponding initial RAM disk image for a given release of the Fedora Linux distribution from https://download.fedoraproject... [fedoraproject.org]/Everything//os/images/pxeboot, where is the Fedora release number and is x86_64 for Intel Macs and aarch64 for Apple silicon Macs.
To launch the virtual machine, run the sample’s executable from Xcode or in Terminal. You’ll need to specify the path to the kernel image and initial RAM disk image as parameters. The parameters are position-dependent, so use the following the order:
% LinuxVirtualMachine [pathToKernelImage] [pathToRAMDiskImage]"
https://developer.apple.com/do... [apple.com]
Re: (Score:2)
When launching a container, they boot a Linux VM that just has a single, statically-linked executable inside: vminitd. No systemd or other daemons. No libc or even ld.so, just vminitd.
That process is responsible for talking to things outside the VM, and for launching the container, etc. When the container process exits, vminitd exits and shuts down the VM. Starting the VM takes ~100ms, and the amount of memory and CPU cores it gets are taken directly from the container configuration. So, it's not terrible in terms of memory usage. It's sort of ideal for short-lived containers, since it starts up so fast and only uses as much memory as the container ends up actually allocating (not what it asked for). I'm not sure how they manage to boot Linux in a VM that fast, honestly. Maybe they have a pickled pre-booted image ready to be mapped into memory so they can tell Linux it's just woken up from being suspended? I have read some of the documentation, but I haven't dug into the code yet.
Meanwhile, it uses Rosetta2 to execute x86 code, so you can both build and run multi-platform containers.
I don't know that I'll actually use it myself, since Rancher Desktop is pretty slick, and I need Kubernetes. But, maybe someone will get k3s working on this and I can get away from having to run a big VM all the time. In any case, it's nice to see Apple recognizing how many people use their machines to build Linux containers, and it's nice to see them making it open source while they're at it. It isn't perfect, but it's at least somewhat clever.
I also think this is how they are going to "sandbox" x86 macOS Apps. Kind of akin to the way Classic MacOS (OS 9) worked in the early days of OS X.
The good news is that this means long-term support for the Most-Excellent Rosetta 2. . .
You want to use macOS' Virtual I/O Device (VIRTIO) (Score:2)
"Virtualization"
https://developer.apple.com/do... [apple.com]
"Running Linux in a Virtual Machine"
https://developer.apple.com/do... [apple.com]
Re: (Score:1)
Rubberstamping this answers nothing that GP brought up.
Being able to run singleton thin-VM "containers" is all well and good. Get back to me when you can run kubernetes on it and it passes certification.
Sounds suspiciously like WSL (Score:2)
Windows Subsystem for Linux lets you do pretty much the same stuff. Lighter than a VM, some degree of isolation, uses the OS. I've personally just tinkered with it a bit, but other developers who do Linux all the time, love it, because it gives them a lot more flexibility than running true VMs.
Sounds like Apple Virtualization framework (Score:1)
Windows Subsystem for Linux lets you do pretty much the same stuff. Lighter than a VM, some degree of isolation, uses the OS. I've personally just tinkered with it a bit, but other developers who do Linux all the time, love it, because it gives them a lot more flexibility than running true VMs.
Sounds suspiciously like something using the Apple Virtualization framework, which has been around since 2020. Basically you can have code create and launch a Linux VM for you.
Re: (Score:2)
Interesting, because I find it a mess.
It reconfigured something hyper visor related, and my Virtual Boxes lost about 25% of their speed, and the GUI is close to unusable.
For my stuff I use Multipass.
Re: (Score:2)
Hypervisor and VirtualBox are full VMs. WSL is a thinner layer with less overhead.
Re: (Score:2)
Re: (Score:2)
WSL, at least WSL2, uses full virtualization - that is, it's a full VM. It's kind of crummy because it looks lightweight when you're setting it up - no tell-tell windows with kernel boot messages and mode changes that'd clue you in on what's happening - but it's actually no lighter than VirtualBox. Well, it doesn't have the legal overheads of VirtualBox ;-) (I think you may be right about WSL 1 but it's barely used and was badly implemented at the time - it couldn't run systemd for instance, and I know you'
Re: (Score:2)
According to Microsoft, WSL uses a "lightweight" VM, not a "full" VM. https://learn.microsoft.com/en... [microsoft.com]
Great now how about on iPad? (Score:2)
crickets