Skip to content
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

Run with Docker on ARM64 #19

Closed
ierturk opened this issue Mar 24, 2021 · 7 comments
Closed

Run with Docker on ARM64 #19

ierturk opened this issue Mar 24, 2021 · 7 comments

Comments

@ierturk
Copy link

ierturk commented Mar 24, 2021

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
@Tiryoh
Copy link
Owner

Tiryoh commented Apr 18, 2021

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.

@ierturk
Copy link
Author

ierturk commented Apr 19, 2021

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

@Tiryoh
Copy link
Owner

Tiryoh commented Apr 19, 2021

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 on Docker 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

@ierturk
Copy link
Author

ierturk commented Apr 19, 2021

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

@Tiryoh
Copy link
Owner

Tiryoh commented Apr 20, 2021

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 on hub 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.

@ierturk
Copy link
Author

ierturk commented Apr 21, 2021

Ok. Thanks @Tiryoh. We can close the issue.

@Tiryoh
Copy link
Owner

Tiryoh commented Apr 21, 2021

Please feel free to open another issue to let me know anything 😄

@Tiryoh Tiryoh closed this as completed Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants