Is it possible to support 32 bit images?

Given that the kvm hypervisor supports 32 bit linux guests unmodified, and 64 bit kernel can run 32 bit binaries unmodified, In theory, it should be possible to run 32 bit images? Docker by itself works:

---> [Warning] The requested image's platform (linux/386) does not match the detected host platform (linux/amd64) and no specific platform was requested
 ---> Running in 72b316f7113c
Removing intermediate container 72b316f7113c
 ---> a32222658cc2
Successfully built a32222658cc2

however, flyctl don’t:

Error error building: error rendering build status stream: failed to get destination image "sha256:25b4cabe2bbca2c88fe3d98e751789319c1c54281848836723db42c311d8929d": image with reference sha256:25b4cabe2bbca2c88fe3d98e751789319c1c54281848836723db42c311d8929d was found but does not match the specified platform: wanted linux/amd64, actual: linux/386

And if I try to push the image directly by: flyctl deploy -i a32222658cc2

--> Pushing image done
Image size: 138 MB
==> Creating release
Error Validation failed: Image must be amd64 architecture for linux us

The failure is in validation. Is it possible to bypass the validation?

Running 32 bit can reduce memory footprint a lot, which is quite useful for low end VMs.

I got it to work. The trick is to build your app in a 32 bit environment then deploy it in a multiarch container, such as: multiarch/debian-debootstrap:i386-bullseye-slim.

1 Like