4 ms·
I think, for me, the biggest fear is using an ARM-based Mac to build cloud-based software that runs on Linux x86. Much of my development environment emulates p
by jasonjei 8y ago
I think, for me, the biggest fear is using an ARM-based Mac to build cloud-based software that runs on Linux x86.
Much of my development environment emulates production in Docker x86, but an ARM-based development environment would have to emulate x86, no?
Alternatively, this could make for building apps in ARM cloud more viable...
- morpheuskafka 8y agoDocker is fully arm compatible, so it should be very easy to run these apps on ARM cloud servers. In fact, as ARM begins to take over the cloud, this could sell a lot more MacBooks for developers.
- jacques_chester 8y agoAMD64 binaries inside a docker image don't spontaneously become ARM binaries if you run them on a different machine.
- zapita 8y agoYou’re right, but there is a very healthy ecosystem of Arm-compatible Docker images and tools already. That definitely gives developers a head start in adding Arm support. Depending on their dependencies, they might not need to do anything more than change labels in their Dockerfile and rebuild.
- weberc2 8y agoI wouldn’t call it healthy. Every time I have an inkling to run k8s on my rpi cluster I find out that there aren’t arm images for many of the tools I want to use, and many of the arm images that exist are hard to find (Docker hub doesn’t/didn’t support searching via arch) or aren’t actively supported. It would be great if everyone did make arm builds for their software, but that’s not been the case in my experience.
- jacques_chester 8y agoThere's a chicken-and-egg thing here. It'd probably shift quickly enough if there were enough devs who wanted it, but that wouldn't (as I noted further up) change the existing blobs. Folks impute magical powers to container systems and I am required by Hacker News civil code §13.3(7) to nitpick it obnoxiously. For comparison, IBM has teams of folks roaming the opensource world looking for things to port to POWER and ppc64le architectures. If you run a successful enough project they show up and start submitting patches.
- justincormack 8y agoThere is search by architecture on Docker Hub now.
- morpheuskafka 8y agoNo, but many images used in the FROM directive do support ARM, so if say you start with an Alpine base image, and then do "apk install nodejs," and then run some Node app code, you don't have to modify a thing for ARM. Just clone and build as usual.
- yjftsjthsd-h 8y agoI know on Linux, you can use qemu as a compatibility layer to run binaries for different architecture. I would expect that it would be relatively simple to do something like that on Darwin. Possibly even literally using qemu; I don't use Apple products personally, so for all that I know support could already exist.
- tedivm 8y agoIf you're doing everything on Docker anyways it kind of doesn't matter, as Docker already runs on top of a linux virtual machine on OSX. As long as Apple puts in the effort to bridge their hypervisor framework[1] this should continue to work. [1] https://developer.apple.com/documentation/hypervisor https://developer.apple.com/documentation/hypervisor
- mkl 8y agoThe current Linux virtual machines use the x86's virtualisation instructions to run at almost native speed. That is not possible if the virtual machine has a different architecture to the host, and execution would be much slower.
- Marsymars 8y agoWindows on ARM performance for x86 emulation is about half that of native code - I'd expect comparable performance from Apple, though from a higher ARM baseline than Snapdragons.
- bluedino 8y agoIf you’re using Docker you’re probably not using a Mac anyway, performance is already terrible.
- bluegreyred 8y agoAgreed, Docker on Mac performance is abysmal. Writing from a container to a shared volume yields sub-10MB/s write speeds and full load on at least two cores via hyperkit. I get that translating I/O between file systems is expensive but even Windows does this better. It's the number one reason why I'm looking into switching away from macOS right now.
- 0x0 8y agoIf you click your own link, you'll quickly notice that the Hypervisor.framework API is incredibly x86-specific, for example one of the methods listed take parameters of type "hv_x86_reg_t". Hypervisor.framework in its current design has nothing to offer for cross architecture emulation. Even if this api was changed to provide arm hypervisor functionality, at best you'd probably be looking at an arm-linux-only variant of docker. Not very useful if you are planning on deploying to x86/x64 linux servers.