Run with Docker on ARM64
ierturk opened this issue ยท 7 comments
I got the error message below when the command below is issued on ARM64 Linux
sudo docker run -it -p 6080:80 -v /new_folder --name ros2_new_folder tiryoh/ros2-desktop-vnc:foxy
The error message
Digest: sha256:2db597366a4b6efbaeb14079a42624d5fa4f7a15c35dca12015bfaeaa6e9ab35
Status: Downloaded newer image for tiryoh/ros2-desktop-vnc:foxy
standard_init_linux.go:211: exec user process caused "exec format error"
Environment:
- The board is Toradex Verdin Mini
- OS is Torizon Linux cretaed with Yocto
Hi @ierturk,
Thanks for your feedback! Sorry for my late reply.
standard_init_linux.go:211: exec user process caused "exec format error"
is a common error that occurs when trying to run a Docker image on a different architecture.
This Dockerfile is based on dorowu/ubuntu-desktop-lxde-vnc.
There were several images that were not released for arm64 when I started to make this Dockerfile repository.
As a starting point, I created a PR for Dashing.
#20
I wrote "Apple Silicon" because I don't have an arm64 Linux machine, but I think it will work.
I'd appreciate it if you could try it and let me know if it works.
Hi @Tiryoh,
Thans for your reply.
When I try to build the Docker file feature/add-foxy-arm64/foxy-arm64/Dockerfile
on Docker Hub
, it fails due to same reason on build stage. So I decided to try Docker buildx
tool on x86 machine
. I tried the docker files under the folder foxy
and foxy-arm64
as follow
docker buildx build --load --platform linux/arm64 --tag ierturk/ros2-desktop-vnc:latest .
docker push ierturk/ros2-desktop-vnc:latest
then run as follow on my arm64 machine
docker run -p 6080:80 --shm-size=512m ierturk/ros2-desktop-vnc:latest
The image was created from the docker file under the folder foxy
gives same error. The other one was created from the docker file under the folder foxy-arm64
runs successfully. You can find the image on my docker hub account ierturk as ierturk/ros2-desktop-vnc
.
Thanks and regards,
Ibrahim
Hi @ierturk,
I've pushed the image to the Docker Hub.
https://hub.docker.com/layers/tiryoh/ros2-desktop-vnc/foxy-arm64-20210420T0029/images/sha256-0fb95dd920bf0c14004be23f2f6708bc40104c1beda43e8dd8c303315fe574d2?context=explore
The image is available with the following command.
docker run -p 6060:80 --shm-size=512m tiryoh/ros2-desktop-vnc:foxy-arm64-20210420T0029
I used Apple Silicon MacBook Air and docker build
command, not docker buildx
command to build the image.
When I try to build the Docker file
feature/add-foxy-arm64/foxy-arm64/Dockerfile
onDocker Hub
, it fails due to same reason on build stage.
It seems like that the Docker Hub automated build does not support arm64 build for non-official images.
I'm planning to use GitHub Actions to push arm64 images.
ref: 1d96efa
Ok. Thanks. The image works on my Toradex Verdin arm64
machine. So I'll remove the image on my repo.
By the way. There are some suggestion on how to automated build for arm64
on hub docker
here but it didn't work for me.
Regards,
Ibrahim
Ok. Thanks. The image works on my
Toradex Verdin arm64
machine. So I'll remove the image on my repo.
Thanks for your feedback, @ierturk!
By the way. There are some suggestion on how to automated build for
arm64
onhub docker
here but it didn't work for me.
Thanks for your additional information!, it did not work for me too. Maybe there could be some way to fix it...
GitHub Actions is very fast and convenient, so I'll use it for the builds.
Please feel free to open another issue to let me know anything ๐