News for hackers. Stuff that matters.
Re:Apple Silicon M1 Chips and Docker by cosmotic on Monday November 16, 2020 @09:48PM (#25119787)
This doesn't really clear up any of the questions I have.

Will docker running on ARM run docker containers from images built for x86? Will docker running on ARM be able to build images for x86?

Re:Apple Silicon M1 Chips and Docker by gilgoomesh on Monday November 16, 2020 @10:01PM (#25119851)
They mention using Apple's Hypervisor Framework. On Apple Silicon, this runs ARM64 programs only (Rosetta 2 is unavailable to programs running inside Apple's Hypervisor Framework).

https://developer.apple.com/documentation/apple_silicon/abou...

Unless they plan to run an emulator inside the Hypervisor Framework (a seemingly unnecessary effort since you could run the emulator without Hypervisor) this implies x86 containers will not work.

Re:Apple Silicon M1 Chips and Docker by lights0123 on Monday November 16, 2020 @10:23PM (#25119969)
Docker for Mac already can build and run cross-arch containers: https://docs.docker.com/docker-for-mac/multi-arch/

And if you're on x86, you can run ARM containers with QEMU userspace emulation seamlessly after running

    docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64
The inverse would be extremely easy as well.
Re:Apple Silicon M1 Chips and Docker by gilgoomesh on Monday November 16, 2020 @10:28PM (#25119996)
Hmm. I would guess then that Docker would be aiming for both emulation and hypervisor. Seems reasonable.
Re:Apple Silicon M1 Chips and Docker by viraptor on Tuesday November 17, 2020 @07:05AM (#25122771)
Seamlessly, but with a heavy performance impact. In my experience it's not really usable in anything other than running specific single tests, or some short demos.
Re:Apple Silicon M1 Chips and Docker by dwaite on Monday November 16, 2020 @09:57PM (#25119832)
Through QEMU
Re:Apple Silicon M1 Chips and Docker by userbinator on Monday November 16, 2020 @10:15PM (#25119930)
I wonder how long it will be until the Hackintosh community manages to boot macOS on a fully emulated ARM hardware.

There are already attempts in progress: https://news.ycombinator.com/item?id=25064593

Re:Apple Silicon M1 Chips and Docker by mistercorea on Monday November 16, 2020 @09:58PM (#25119841)
isnt that linux specific?
Re:Apple Silicon M1 Chips and Docker by yjftsjthsd-h on Monday November 16, 2020 @10:03PM (#25119857)
No, although the KVM acceleration is (but there are others; I've used HAXM on NetBSD).

EDIT: Just realized that you probably meant for binary compatibility. That also is not Linux-only, but https://qemu.readthedocs.io/en/latest/user/main.html#support... only talks about Linux and BSD, with no mention of Darwin.

Re:Apple Silicon M1 Chips and Docker by mistercorea on Monday November 16, 2020 @09:57PM (#25119840)
Right. if it is building it's own linux kernel and build container it defeats the purpose of having a docker....
Re:Apple Silicon M1 Chips and Docker by yjftsjthsd-h on Monday November 16, 2020 @10:06PM (#25119874)
Running docker containers on Darwin already required you to run a Linux kernel, though?
Re:Apple Silicon M1 Chips and Docker by mistercorea on Monday November 16, 2020 @10:10PM (#25119893)
Yes but this was possible through virtual machine(virtualbox)
Re:Apple Silicon M1 Chips and Docker by olliej on Monday November 16, 2020 @10:21PM (#25119958)
No. That's what they said: you will build for your deployment architecture, just as you would today with the arm aws systems. The virtualization is that: virtualization. It isn't emulation for that you need Qemu or similar.
Re:Apple Silicon M1 Chips and Docker by raverbashing on Monday November 16, 2020 @10:06PM (#25119878)
The question is: why even care?

Use an Arm image. For docker, it makes little to no difference

Re:Apple Silicon M1 Chips and Docker by yjftsjthsd-h on Monday November 16, 2020 @10:12PM (#25119910)
That requires that ARM images are available, which will take time and always have a disconnect. It also violates the idea of being able to run the exact same image on your laptop (ARM Mac) and in prod (x86 server).
Re:Apple Silicon M1 Chips and Docker by jrockway on Monday November 16, 2020 @10:27PM (#25119993)
You can run on ARM servers in production. They're even cheaper than x86 servers. (Though also slower, at least AWS's version.)

Realistically, ARM is probably the future, and just needs something to push society in the direction of the future. A lot of people use Macs, so this forces people to become interested in switching, which has some value. Remember when the original iMac had USB instead of ADB ports? Everyone was mad about it. But USB was the future -- you can plug that iMac's mouse into pretty much any computer you have and it still works.

(I've been wanting an ARM desktop for a while, but it seems there is trouble standardizing something like BIOS/UEFI, and the CPUs you can buy are more expensive and slower than x86 alternatives. I'm also not sure if anyone ever decided what the standard "ARM" configuration looks like... binary calling conventions, endianness, supported instructions? But, if Apple can make a competitive ARM chip, so can others, and the standards will follow. We'll see!)

Re:Apple Silicon M1 Chips and Docker by vbezhenar on Monday November 16, 2020 @11:55PM (#25120378)
> You can run on ARM servers in production. They're even cheaper than x86 servers. (Though also slower, at least AWS's version.)

Where can I buy ARM server comparable with x86 server on performance? I'm not interested with clouds, I want bare metal server. I'm not aware of any server brand like HP or Dell producing ARM servers. I'm also not aware of any CPU manufacturer producing computer desktops with ARM comparable with x86, outside of Apple macs. I'm not convinced that ARM is the future. For me the future is both architectures co-existing.

Re:Apple Silicon M1 Chips and Docker by viraptor on Tuesday November 17, 2020 @07:09AM (#25122810)
> I'm not interested with clouds, I want bare metal server.

You can have both.

https://aws.amazon.com/blogs/aws/now-available-bare-metal-ar...

Re:Apple Silicon M1 Chips and Docker by yjftsjthsd-h on Tuesday November 17, 2020 @05:11PM (#25130617)
I promise that is not what 90% of people mean when they say they want bare metal, and not what 99% of people mean when they say they don't want "cloud"; it's still AWS's machine.
Re:Apple Silicon M1 Chips and Docker by viraptor on Tuesday November 17, 2020 @06:14PM (#25131190)
Honestly, if they mean "owned machine in colo" they should say that rather than "bare metal". Those are orthogonal concepts. (You can have VM instances on a private cloud on owned machines as well)

If you're actually interested in buying servers this is not a pedantic difference.

Re:Apple Silicon M1 Chips and Docker by sitkack on Monday November 16, 2020 @11:50PM (#25120357)
It wasn't though, the same Dockerfile, but not the same image. The images are ephemeral and stateless, being only a projection of the Dockerfile.
Re:Apple Silicon M1 Chips and Docker by tasogare on Tuesday November 17, 2020 @12:01AM (#25120416)
Running the same image on dev machine and prod was an illusion brought by the fact the underlying architecture was the same. It’s not reasonable to expect images to magically be cross-architecture.
Re:Apple Silicon M1 Chips and Docker by raverbashing on Tuesday November 17, 2020 @03:40AM (#25121403)
> It also violates the idea of being able to run the exact same image on your laptop (ARM Mac) and in prod (x86 server).

99% of people are running node/python/RoR/PHP on Ubuntu/Debian/Arch. It works the same for most cases. (possible caveat: I'm not sure if numpy and TensorFlow is supported already but it probably is)

But for basic stuff, it's a non-issue

Re:Apple Silicon M1 Chips and Docker by yjftsjthsd-h on Tuesday November 17, 2020 @01:31PM (#25127599)
You still can't use the same container image across architectures, even if the important parts are interpreted code. You can package the architecture-independent parts for both x86 and ARM, of course, but as you sort of touch on, that still leaves dependency issues and surprise differences in the platform ("oh look, this is so fast on my mac where there's hardware acceleration for the C library used in this hot path" followed 3 weeks later by, "why is this so slow on our x86 servers?").
Re:Apple Silicon M1 Chips and Docker by ninkendo on Monday November 16, 2020 @10:16PM (#25119934)
What are you going to deploy that ARM image to?
Re:Apple Silicon M1 Chips and Docker by fiddlerwoaroof on Monday November 16, 2020 @10:31PM (#25120011)
Aws Graviton2 images. It’s exciting to finally have ARM consumer laptops: it’ll encourage people to port applications to ARM which will make it easier to take advantage of cheap ARM servers.
Re:Apple Silicon M1 Chips and Docker by viraptor on Tuesday November 17, 2020 @07:13AM (#25122841)
> It’s exciting to finally have ARM consumer laptops:

Apple may be the loudest and now the fastest available, but the ARM consumer laptops existed for some time already. For example https://www.lenovo.com/au/en/laptops/ideapad/ideapad-s-serie...

Re:Apple Silicon M1 Chips and Docker by fiddlerwoaroof on Tuesday November 17, 2020 @11:13AM (#25125444)
Sure, historically Apple makes the first device in various categories that achieves wide consumer adoption.
Re:Apple Silicon M1 Chips and Docker by oplav on Monday November 16, 2020 @11:37PM (#25120303)
While AWS has ARM servers available, GCP currently does not and it doesn’t seem to be on their immediate roadmap.
Re:Apple Silicon M1 Chips and Docker by mistercorea on Monday November 16, 2020 @10:11PM (#25119900)
that mean you need to have an arm based server for deployment of your code / services.
Re:Apple Silicon M1 Chips and Docker by johnklos on Monday November 16, 2020 @10:06PM (#25119873)
Answer your own question: Can Docker on ARM run x86? Can Docker on x86 run ARM?

If not, then why expect Apple ARM to run x86?

Re:Apple Silicon M1 Chips and Docker by afandian on Monday November 16, 2020 @10:12PM (#25119909)
Apple ARM can run x86 under Rosetta 2. The question is whether that can happen under Docker.
Re:Apple Silicon M1 Chips and Docker by olliej on Monday November 16, 2020 @10:23PM (#25119967)
It runs user space x86 under arm, and those are all well formed programs that the os understands. Rosetta is a translator - to run a vm in a different architecture requires an emulator.
Re:Apple Silicon M1 Chips and Docker by DarmokJalad1701 on Monday November 16, 2020 @11:00PM (#25120141)
> Can Docker on x86 run ARM

Yes. There are ways to set up Docker to seamlessly run arm containers on x86 using CPU emulation.