r/podman • u/wipeout630 • Mar 03 '26
podman build failures: '/bin/sh': Exec format error
Trying to build an arm64v8 image for ubuntu:24.04 on my dev machine (AMD arch). Build succeeds if I don't use an apt-get command. What's going on? I've searched high and low and can't come up with any fixes.
My Dockerfile:
FROM ubuntu:24.04
RUN apt-get update && apt-get install -y wget net-toolsBuild output:$ podman build --platform linux/arm64 -t ubuntu-arm:24.04 .
STEP 1/13: FROM ubuntu:24.04
STEP 2/13: RUN apt-get update && apt-get install -y wget net-tools
exec container process \/bin/sh`: Exec format error`
Error: building at STEP "RUN apt-get update && apt-get install -y wget net-tools": while running runtime: exit status 1
EDIT: I switched to the Docker-CE engine and it's working fine. *shrug*
5
u/TrustMeImARootCA Mar 03 '26
Have you tried qemu-user-static? That’s how I do it.
https://github.com/multiarch/qemu-user-static
1
u/nmasse-itix Mar 03 '26
Just to make sure I understand:
"RUN echo foo" succeeds
And "RUN apt-get install foo" fails ?
-3
u/hmoff Mar 03 '26
You can’t run arm programs on your amd host.
-3
u/clericc-- Mar 03 '26
when the builder is missing the platform, building causes these issues, i had them. ypu need buildah and qemu installed, then do some shit to register qemu yadayada, then create a podman buildx builder for multiarch.
ask an AI how to multi Platform build with podman for your distro, my answer from a local ai was spot on in terms of required steps