Score:1

Why are docker images - architecture specific?

us flag

I would like to better understand - why are Docker images - architecture specific? Why do I need different images for an ARM-processor-architectur, than for ARM64 AArch32 etc?

Docker images obviously contain processor specific instructions, which makes them architecture dependent.
Which part of the docker images contains processor specific instructions and why?

Why doesnt Docker-Runtime provide an abstraction layer, which is architecture independent?

Is it, because the layer otherwise would be comparable with the HyperVisor layer in VMs and wouldnt be "lightweighted" anymore?

Ben Butterworth avatar
in flag
I think the docker documentation on [Leverage multi-CPU architecture support](https://docs.docker.com/desktop/multi-arch/#multi-arch-support-on-docker-desktop) is helpful. Most official docker images have multiple-architecure support.
Score:3
cn flag

What is the expected contents of a docker image? An application + all supporting libraries and any other required files.
What does that normally mean in practice? Basically a trimmed down Linux userland + the application.

Of course not every single file is architecture specific, but the binaries and libraries were compiled for some specific architecture (this is obviously the case whether they were placed in a docker image or not).

There is no magic going on here, the docker image is just a means of packaging and distributing the application. It doesn't transform an application compiled for x86-64, arm64, or whatever into being architecture agnostic.

And if the application is in some non-compiled language, like a Python application or Nodejs application, then the above just applies to the runtime instead; the Python runtime or Nodejs runtime was built for some specific architecture and needs the appropriate supporting libraries built for that same architecture.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.