Hi @abmg – thanks for the additional info. I was able to duplicate your problems when deploying to my Jetson Nano, using your Dockerfile. I think what’s happening here is that the image is being built using an incorrect architecture; if I add the
file utility to the
nginx:alpine container, I can see that:
- when I run
balena deploy locally, the
nginx binary is for x86_64 (my laptop’s architecture); on my Nano, I see the
exec format error you saw;
- but when I run
balena push, which uses the balena Cloud builders, the binary is for ARM aarch64 architecture, and on the Nano everything is fine.
I was able to get around this by using https://hub.docker.com/r/arm64v8/nginx, which is an official Docker build of nginx for 64-bit ARM:
FROM arm64v8/nginx as the first line of the Dockerfile
balena deploy JetsonNanoApp --emulated --build as the command
A quick search turned up this issue and this forum post, which offer a good background on what’s going on here.
One thing I’m not sure about is whether the balena CLI should be fetching the correct image when using
nginx:alpine; I will check with a colleague of mine and get back to you. In the meantime, can you give this workaround a try and let us know if it works for you?
All the best,