6 ms·
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 AR
by cosmotic 6y ago
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?
- dwaite 6y agoThrough QEMU
- mistercorea 6y agoisnt that linux specific?
- yjftsjthsd-h 6y agoNo, 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#supported-operating-systems https://qemu.readthedocs.io/en/latest/user/main.html#support... only talks about Linux and BSD, with no mention of Darwin.
- deleted 6y ago[deleted]
- userbinator 6y agoI 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 https://news.ycombinator.com/item?id=25064593
- mistercorea 6y agoRight. if it is building it's own linux kernel and build container it defeats the purpose of having a docker....
- yjftsjthsd-h 6y agoRunning docker containers on Darwin already required you to run a Linux kernel, though?
- mistercorea 6y agoYes but this was possible through virtual machine(virtualbox)
- gilgoomesh 6y agoThey 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/about_the_rosetta_translation_environment 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.
- lights0123 6y agoDocker for Mac already can build and run cross-arch containers: https://docs.docker.com/docker-for-mac/multi-arch/ 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.
- gilgoomesh 6y agoHmm. I would guess then that Docker would be aiming for both emulation and hypervisor. Seems reasonable.
- viraptor 6y agoSeamlessly, 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.
- johnklos 6y agoAnswer 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?
- afandian 6y agoApple ARM can run x86 under Rosetta 2. The question is whether that can happen under Docker.
- olliej 6y agoIt 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.
- DarmokJalad1701 6y ago> Can Docker on x86 run ARM Yes. There are ways to set up Docker to seamlessly run arm containers on x86 using CPU emulation.
- raverbashing 6y agoThe question is: why even care? Use an Arm image. For docker, it makes little to no difference
- mistercorea 6y agothat mean you need to have an arm based server for deployment of your code / services.
- yjftsjthsd-h 6y agoThat 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).
- jrockway 6y agoYou 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!)
- vbezhenar 6y ago> 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.
- olliej 6y agoNo. 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.