[ros-users] [Discourse.ros.org] [General] Announcing ROS Docker Images for ARM and Debian

ruffsl ros.discourse at gmail.com
Fri Aug 18 19:41:05 UTC 2017

**TL;DR**: Support for both ARM and Debian with ROS is now reflected in the Official DockerHub library! :whale:

Hello everyone! 

As you might have noticed, DockerHub is beginning to support additional architectures other than amd64 [1]. So I've expanded upon our dockerfile maintenance infrastructure for the official ROS images to enable arm support.

Additionally while refactoring, support for multiple operating systems, i.e. debian based  ROS images, has also been enabled, while also extending to supported arm architectures. To see the listing of supported suites, distros and architectures for the official DockerHub library, you can view the manifest for ROS here [2]:


### Notes:
* New tags have been added to specify the operating system suite via appended suffix
  * E.g. `kinetic-ros-base-xenial`, `kinetic-ros-base-jessie`
* There are no changes to the original set of tags, as they still point to the same suite
  * E.g. `kinetic` <=> `kinetic-ros-base` <=> `kinetic-ros-base-xenial`
  * Additionally true for `amd64` tagged images hosted from osrf/ros automated repo 
* **Presently**, the multi-architecture ROS images are hosted under separate docker hub organizations
  * E.g. `docker pull arm64v8/ros` OR `docker pull arm32v7/ros:indigo`
  * You may reference `<arch>/ros:<tag>` to specifically pull a given architecture
  * OR try out the ***temporary*** manifest enabled test rolling repo: `docker pull trollin/ros`
* **Forthcoming**, the official registry will internally negotiate what arch is pulled via the manifest 
  * E.g. if docker-engine host is `arm64v8`, `docker pull ros` should pull an `arm64v8` image
* There is some build scaffolding you can follow for multi-architecture image builds for ROS
  * E.g. [arm32v7/job/ros](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/ros/), [arm64v8/job/ros](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/ros/)

This is all fairly new, so if you'd like to start learning more, here's a relatively recent article on the subject [3]:

Of course, if you'd like to play around with any of the arm images, but don't have raspberry pie or other arm based platform laying around, you can easily emulate via qemu-user and binfmt-support. By mounting in the necessary qemu-user static binaries into the container, and installing the necessary binfmt-support kernel module to the host, you can run commands within the arm environment on your `amd64` workstation. 

E.g. a small script, such as in `cross-docker` for example [4], can be used like so:

``` terminal
$ sudo apt install qemu-user-static

$ uname -a
Linux ubuntu 4.8.0-58-generic #63~16.04.1-Ubuntu SMP 
 Mon Jun 26 18:08:51 UTC 2017 
 x86_64 x86_64 x86_64 GNU/Linux

$ ./cross-docker run -it arm64v8/ros:lunar-ros-core-stretch uname -a
Unable to find image 'arm64v8/ros:lunar-ros-core-stretch' locally
lunar-ros-core-stretch: Pulling from arm64v8/ros
774bc81cd4dd: Pull complete 
Digest: sha256:dd88dce3f840cc963a61881a1da4f36f1c66214dd1b0029fa433580a4f5a142f
Status: Downloaded newer image for arm64v8/ros:lunar-ros-core-stretch
Linux a2a63cc39389 4.8.0-58-generic #63~16.04.1-Ubuntu SMP
 Mon Jun 26 18:08:51 UTC 2017
 aarch64 GNU/Linux

$ ./cross-docker run -it arm64v8/ros:lunar-ros-core-stretch cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION="9 (stretch)"

If you find issues with the images, please be sure to ticket them here [5]: 

Also don't forget to share our official repo [6] so others might discover it!


[1] https://github.com/docker-library/official-images#architectures-other-than-amd64
[2] https://github.com/docker-library/official-images/blob/master/library/ros
[3] https://developer.ibm.com/linuxonpower/2017/07/27/create-multi-architecture-docker-image/
[4] https://github.com/justincormack/cross-docker , https://docs.docker.com/docker-for-mac/multi-arch/
[5] https://github.com/osrf/docker_images
[6] https://hub.docker.com/_/ros/

### P.S. 
For `arm32v7`, there is a blocking issue upstream with cloud image used in docker hub. If you would like to expedite `arm32v7` support for ROS docker images, you may make your concerns know and follow the bug report:

Although some `i386` binaries are supplied by the ROS buildfarm, I've deliberately omitted it for now, given:
1. `i386` binaries for docker-engine are not officially shipped or supported by Docker
2. Current traffic for `i386` ROS packages is below that for arm

[Visit Topic](https://discourse.ros.org/t/announcing-ros-docker-images-for-arm-and-debian/2467/1) or reply to this email to respond.

More information about the ros-users mailing list