Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Situation
- I have an application with architecture==armv7hf (ie, 32-bit with an FPU), containing one device (a raspberry pi 3b+, which supports both 32-bit armv7hf and 64-bit arm64), and a Dockerfile that says in relevant part:
- services:
- postgres:
- image: postgres:9
- Note that, as far as I can tell from:
- https://hub.docker.com/_/postgres/
- ... this 'postgres' image is a multi-architecture image that supports arm32 v7, although this is not explicitly stated anywhere that I can find.
- What I would like to happen is
- - The build tool (Balena, Docker [Compose], the resin.io builder, or whatever else reads this docker-compose file) shall determine the target platform (in this case, the resin.io builder shall see that the application's architecture is set to armv7hf)
- - The build tool shall build images that are compatible with the target architecture.
- What actually happens is
- - The resin.io builder produces images containing arm64 binaries, even when targeting an application with architecture 'armv7hf'
- - The image download wizard thingy in the resin.io console spits out a 32-bit armv7hf ResinOS image when you add a 'raspberry pi 3' device to your project
- - As a result, when the device downloads and attempts to run the newly-built containers, it attempts to run 64-bit ARM binaries on a 32-bit ARM kernel running on 64-bit-capable ARM hardware, which can never work
- - So containers restart continually and spam the logs with 'exec format error'
- I don't understand why the resin.io builder is producing arm64 binaries. This appears to me to be a bug, as I did not specify 'arm64' as the target platform for my application (I don't even know of a way to do that).
- Questions
- - Is there a way to force the resin.io builders to build a certain architecture to work around this?
- - Alternatively, if there's no way to force the resin.io builder to use the correct architecture, then can I build images locally instead, thus disusing the resin.io builder? (My assumption here is that Docker will choose the correct architecture).
- - Alternatively, is there an arm64 build of ResinOS? Migrating both the kernel and userspace to 64-bit on this dual-arch-capable hardware would also be a workaround.
- - Is this simply due to the following TODO item?
- https://github.com/resin-os/balena-containerd/blob/036232856fb8f088a844b22f3330bcddb5d44c0a/image.go#L80
Advertisement
Add Comment
Please, Sign In to add comment