News for hackers. Stuff that matters.
Re:About the Rosetta Translation Environment by marcinzm on Tuesday June 23, 2020 @10:24AM (#23614271)
>However, Rosetta doesn’t translate the following executables: Virtual Machine apps that virtualize x86_64 computer platforms

How will this impact docker? Does this mean you can't run x86 docker containers on new Apple laptops?

Re:About the Rosetta Translation Environment by jedieaston on Tuesday June 23, 2020 @10:31AM (#23614351)
Docker on ARM will work, Docker for x86 will not. The State of the Union showed a demo of Hypervisor.framework with Parallels, and they made it clear that Debian AArch64 was running (uname -a). Since Docker runs inside a VM on the Mac, it'll have to be an ARM VM with ARM containers.

(Presumably, running docker build with your Dockerfile will make it work just fine, unless you need x86 specific libraries).

Re:About the Rosetta Translation Environment by nielsole on Tuesday June 23, 2020 @11:22AM (#23615094)
Could you run the linux docker machine on aarch64 and just the docker container/process on JIT-x86? The majority of syscalls doesn't care about architecture, do they? And the OS should theoretically be agnostic to the machine code the application is written in. Probably requires some cooperation on part of the linux docker host. Did I get the idea across?

You would go to hell for implementing that either way

Re:About the Rosetta Translation Environment by jedieaston on Tuesday June 23, 2020 @12:37PM (#23616339)
You should be able to, since everything Docker runs inside of a Linux VM. You don't get to use Rosetta though (since it's a macOS thing), and the performance may be poor.
Re:About the Rosetta Translation Environment by cpuguy83 on Tuesday June 23, 2020 @10:35AM (#23614407)
Apple mentioned they are specifically "working with Docker to support 'these things' in coming months". Confirmed with some Docker folks they are working on "something". All very nondescript, but they said they can't talk about it yet.
Re:About the Rosetta Translation Environment by numpad0 on Tuesday June 23, 2020 @11:36AM (#23615333)
So I had to look this up: Docker do not rely on VT-x. If kernel has cgroups it runs.

Hypothetically it could run natively on Windows NT, Linux, Darwin, Solaris, etc if it ported for appropriate APIs. However, most Docker containers contain x86_64 Linux binaries, so the runtime environment has to be binary compatible with x86_64 Linux.

Thus, instead of going through the pain similar to WSL1, Docker people just spin up a midsize Linux VM, run remote controlled Docker daemon in it and call that as the "Docker for [PLATFORM]". This will suffice because use case of Docker is to debug on a laptop and deploy to GNU/Linux servers.

So if ARM macOS runs an x86_64 Ubuntu VM it also means Docker runs.

Re:About the Rosetta Translation Environment by monocasa on Tuesday June 23, 2020 @02:14PM (#23617936)
Docker on mac does rely on virtualizing a full linux kernel, and xnu doesn't have containerization APIs to do anything different.

> So if ARM macOS runs an x86_64 Ubuntu VM it also means Docker runs.

So far we haven't seen anything like that happening. The State of the Union talk yesterday went as far as running a uname -a just to show that it was an aarch64 debian they were running.

Re:About the Rosetta Translation Environment by lsllc on Tuesday June 23, 2020 @11:04AM (#23614811)
Possibly they'll do something like WSL/WSL2 to provide an ARM based Linux kernel interface and then use Rosetta2 to translate the x64 code in user space to ARM?

Having ARM only containers would be mostly useless (it's technically possible, but I bet there are very few ARM container images around).

Re:About the Rosetta Translation Environment by dannyw on Tuesday June 23, 2020 @11:25AM (#23615151)
There are heaps and heaps of ARM containers around thanks to the Raspberry Pi.

I've never had a problem running Docker on my Pi, and I don't expect anyone will have a problem running Docker on a Mac given Apple's much much larger developer market share.

Re:About the Rosetta Translation Environment by cpuguy83 on Tuesday June 23, 2020 @11:21AM (#23615068)
All the base images are multi arch, which I suspect covers the majority of uses in dev envs.
Re:About the Rosetta Translation Environment by linux2647 on Tuesday June 23, 2020 @10:28AM (#23614311)
My understanding is that the virtualization Apple provides is only for the same architecture as the host OS. In the demos given running Debian, they run uname -a and it reports aarch64
Re:About the Rosetta Translation Environment by DCKing on Tuesday June 23, 2020 @10:41AM (#23614490)
Docker has had an experimental feature for some time to build containers cross architecture [1]. I'm guessing this transition is a good excuse to finish that up. Running cross architecture containers with only Docker is not possible as far as I know.

I'm guessing that we're going to have to see a lot better adoption of cross-platform container builds because of this.

[1]: https://docs.docker.com/buildx/working-with-buildx/#build-mu...

Re:About the Rosetta Translation Environment by cloogshicer on Tuesday June 23, 2020 @10:26AM (#23614291)
Not sure about the details for how this works, but they specifically mentioned Docker to be supported at the keynote.
Re:About the Rosetta Translation Environment by dividedbyzero on Tuesday June 23, 2020 @10:30AM (#23614344)
Docker already runs fine on ARM64, like on Raspberry Pis, so there would be no Rosetta translation needed for ARM64 images. If Rosetta could translate binaries in x86/AMD64 images, that would be very helpful indeed.

Likewise, will it support CLI programs at all?

Re:About the Rosetta Translation Environment by marcinzm on Tuesday June 23, 2020 @10:27AM (#23614304)
x86 docker or just docker? There's ARM docker containers as well.
Re:About the Rosetta Translation Environment by mrkstu on Tuesday June 23, 2020 @10:34AM (#23614394)
They haven’t clarified if Docker is ARM all the way down or if they are using QEMU to emulate x86 somewhere on the stack.
Re:About the Rosetta Translation Environment by monocasa on Tuesday June 23, 2020 @10:39AM (#23614458)
They wouldn't need qemu anywhere either way; they have their own binary translator.
Re:About the Rosetta Translation Environment by mrkstu on Tuesday June 23, 2020 @01:08PM (#23616903)
They've specifically called out that OS level virtualization isn't available in Rosetta 2. So if there is an x86 dependency QEMU becomes necessary.
Re:About the Rosetta Translation Environment by monocasa on Tuesday June 23, 2020 @01:49PM (#23617544)
There's qemu-user for user mode only emulation in addition to qemu-system.
Re:About the Rosetta Translation Environment by saagarjha on Tuesday June 23, 2020 @10:42AM (#23614517)
Which for all we know could be qemu ;)
Re:About the Rosetta Translation Environment by monocasa on Tuesday June 23, 2020 @10:48AM (#23614595)
I mean, they have a better emulator that they bought from the QuickTransit folk.
Re:About the Rosetta Translation Environment by EtienneK on Tuesday June 23, 2020 @10:28AM (#23614308)
I would assume you’d only be able to run ARM Docker containers.
Re:About the Rosetta Translation Environment by marcinzm on Tuesday June 23, 2020 @10:29AM (#23614318)
Which is less than ideal if you're using x86 servers since you no longer have the same dev containers as production containers.
Re:About the Rosetta Translation Environment by cpuguy83 on Tuesday June 23, 2020 @11:39AM (#23615372)
I don't think people should consider the vm Docker For Mac uses anything close to resembling production as is.
Re:About the Rosetta Translation Environment by EtienneK on Tuesday June 23, 2020 @10:31AM (#23614352)
Yeah. I predict a sudden increase of ARM servers as well.
Re:About the Rosetta Translation Environment by dividedbyzero on Tuesday June 23, 2020 @10:55AM (#23614691)
And maybe even some decent ARM Linux laptops. One may dream...
Re:About the Rosetta Translation Environment by flir on Tuesday June 23, 2020 @10:45AM (#23614564)
Do Amazon have an ARM server product?
Re:About the Rosetta Translation Environment by alexandrvicente on Tuesday June 23, 2020 @10:51AM (#23614633)
Re:About the Rosetta Translation Environment by NovemberWhiskey on Tuesday June 23, 2020 @11:13AM (#23614967)
... and it's actually kinda kick-ass - the original A1 instances were fairly disappointing but the M6g is at an extremely aggressive price/performance point.