-
-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raspberry pi: standard_init_linux.go:190: exec user process caused "exec format error" #67
Comments
Raspberry Pi requires images to be compiled for that architecture, ARM. And although Docker now supports different architectures, and I understand the image format also supports specifying architectures, there's no way to handle it through Docker Hub with the "standard" Docker Hub automated build. I have already taken several steps (actually some months ago) to make the image, configuration and dependencies compatible with multi-arch (I've worked a lot with Pis). The only step missing is Docker Hub support for automated building images for Raspberry Pi. For now, I suggest you try cloning this repository in your Pi and building the base image locally. In theory, it should all work. After that, you can run your image normally: git clone https://github.com/tiangolo/uwsgi-nginx-flask-docker.git
cd uwsgi-nginx-flask-docker/python3.6
docker build -t tiangolo/uwsgi-nginx-flask:python3.6 . And then run again: docker run -it tiangolo/uwsgi-nginx-flask:python3.6 bash I'm not running all those commands right now as I'm typing them here, so it's possible that y put a typo there (so, copy-pasting might not work). Please make sure they are right locally. And let me know how it goes. |
Thanks for the details! I didn't notice any typos :)
Here's the output:
|
Oh! Right, sorry, I get what happened. This image, That one (
After building
|
Thanks for the help! That solves it! Just for posterity, these are the commands I ran from start to finish for a working build
|
Thanks for reporting back! 🎉 |
@tiangolo Do you have any thoughts on how I could package all of this into one Dockerfile? |
Do you mean a single If that's the case, I guess that you don't want to have to be building 3 images in each Raspberry Pi for your image to work or something similar. Also, have in mind that once the 2 base images are built on your Pi, you don't have to re-build them again, the images persist in your Docker, inside your Pi. You only need to rebuild your app image. But if you want to deploy it to several Pis I guess you wouldn't want to compile 3 images each time. If you are running it on a Raspberry Pi, I imagine it probably won't serve a large scale user base. If that's the case, you could just install uWSGI, without Nginx, and use it directly. Recent versions of uWSGI are supposed to have decent performance without absolutely requiring Nginx. And by discarding Nginx, you no longer need to have 2 processes at the same time, so you no longer need to have a third process to control the other 2 (Supervisord). So you could discard that too. In summary, I think you can try with uWSGI alone and see how it goes. It should be way simpler to set up. |
I suppose, there's no real reason for me to put this on multiple Raspberry Pi's, but sometimes we do things for fun :) Regardless, I ended up building each base image on a Raspberry Pi and pushing them to dockerhub. This allows me to mirror the way you've setup your Dockerimages and I can pull the two base images, however now they have been built specifically for a Raspberry Pi. https://hub.docker.com/r/crawforc3/raspberrypi-uwsgi-nginx/ |
Ah! Cool! 🐳 |
Hi @crawforc3 , Would you mind please share your repo for the raspberry pi image you created? I'm trying to build a multi platform image using Github Action + buildx but the arm64 is not working showing "exec format error". I'm using Thanks |
I crated a github action that builds arm64 and armf on all containers.For now its pushed to my repo: |
What do I need to do to get the python3.6 container running on a Raspberrypi 3?
The text was updated successfully, but these errors were encountered: