|
| 1 | +--- |
| 2 | +title: "Multi-Arch Images via Docker Selenium" |
| 3 | +linkTitle: "Multi-Arch Images via Docker Selenium" |
| 4 | +date: 2024-05-23 |
| 5 | +tags: [ "Grid", "Docker", "Kubernetes" ] |
| 6 | +categories: [ "Docker" ] |
| 7 | +author: Viet Nguyen Duc [@VietND96](https://github.com/VietND96) |
| 8 | +description: > |
| 9 | + This blog post announces the availability of Multi-Arch Images for Selenium Grid Server on the official Selenium Docker Hub registry. |
| 10 | +--- |
| 11 | + |
| 12 | +We're very happy to announce the landing of Multi-Arch Images for Selenium Grid Server on |
| 13 | +the [Selenium](https://hub.docker.com/r/selenium/) Docker Hub registry! |
| 14 | + |
| 15 | +### Motivation |
| 16 | + |
| 17 | +For experimental Docker container images that are able to run on platforms such as the Apple M-series or Raspberry Pi, |
| 18 | +the community-driven repository initiative hosted |
| 19 | +at [SeleniumHQ-Community/docker-seleniarm](https://github.com/seleniumhq-community/docker-seleniarm). These images are |
| 20 | +built for separate architectures: linux/arm64 (aarch64), linux/arm/v7 (armhf), and linux/amd64 and published |
| 21 | +on [Seleniarm](https://hub.docker.com/u/seleniarm) Docker Hub registry. |
| 22 | + |
| 23 | +In order to bring more awareness to the existence of the Multi-Arch Docker container images, provide more insight and |
| 24 | +transparency on how the container images are built, as well as overcome challenges in building and maintaining them. We |
| 25 | +have decided to merge the fork into the main project [Docker Selenium](https://github.com/SeleniumHQ/docker-selenium) |
| 26 | +and |
| 27 | +published multi-arch images on [Selenium](https://hub.docker.com/r/selenium/) Docker Hub registry. |
| 28 | + |
| 29 | +### Overview |
| 30 | + |
| 31 | +From image tag [releases](https://github.com/SeleniumHQ/docker-selenium/releases) `4.21.0` onwards, the architectures |
| 32 | +supported by Docker Selenium as below |
| 33 | + |
| 34 | +| Architecture | Operating System | Available | |
| 35 | +|:-------------------------:|------------------|:---------:| |
| 36 | +| x86_64 (aka amd64) | Ubuntu LTS | ✅ | |
| 37 | +| aarch64 (aka arm64/armv8) | Ubuntu LTS | ✅ | |
| 38 | +| armhf (aka arm32/armv7l) | N/A | ❌ | |
| 39 | + |
| 40 | +Based on the architecture of the host machine, Docker will automatically pull the correct image for the platform. |
| 41 | + |
| 42 | +### Browser Binaries |
| 43 | + |
| 44 | +Let's take a moment to look at the browser binaries which are available for various architectures |
| 45 | + |
| 46 | +Google does not build Chrome (google-chrome) for Linux/ARM platforms. Hence, the Chrome (node and standalone) images are |
| 47 | +only available for AMD64. Similarly, Microsoft does not build Edge (microsoft-edge) for Linux/ARM platforms. |
| 48 | + |
| 49 | +Instead, the open source Chromium browser is used in place of Chrome and Edge. The `standalone-chromium` |
| 50 | +and `node-chromium` |
| 51 | + |
| 52 | +```bash |
| 53 | +$ docker run --rm -it -p 4444:4444 -p 5900:5900 -p 7900:7900 --shm-size 2g selenium/standalone-chromium:latest |
| 54 | +``` |
| 55 | + |
| 56 | +Mozilla Firefox now is available for Linux/ARM64 |
| 57 | +via [Nightly](https://blog.nightly.mozilla.org/2024/04/19/firefox-nightly-now-available-for-linux-on-arm64/) channel. |
| 58 | +The Firefox version in the ARM64 image will be different from the AMD64 version until the stable release is available. |
| 59 | + |
| 60 | +| Image Name | Operating System | amd64 | arm64 | |
| 61 | +|---------------------|------------------|-------|-------| |
| 62 | +| standalone-chromium | Ubuntu LTS | ✅ | ✅ | |
| 63 | +| node-chromium | Ubuntu LTS | ✅ | ✅ | |
| 64 | +| standalone-firefox | Ubuntu LTS | ✅ | ✅ | |
| 65 | +| node-firefox | Ubuntu LTS | ✅ | ✅ | |
| 66 | +| standalone-edge | Ubuntu LTS | ✅ | ❌ | |
| 67 | +| node-edge | Ubuntu LTS | ✅ | ❌ | |
| 68 | +| standalone-chrome | Ubuntu LTS | ✅ | ❌ | |
| 69 | +| node-chrome | Ubuntu LTS | ✅ | ❌ | |
| 70 | + |
| 71 | +### Build, test, and distribute multi-arch images |
| 72 | + |
| 73 | +We would also like to share what has been done to ensure that the multi-arch images can be built, tested, and |
| 74 | +distributed seamlessly. |
| 75 | + |
| 76 | +- Utilize Bash scripts and Makefile to wrap the tasks as much as possible. It provides the transparency on how the |
| 77 | + container images are built and proceed by single command. |
| 78 | + |
| 79 | +- Utilize Arm VM's support on [CircleCI](https://app.circleci.com/pipelines/github/SeleniumHQ/docker-selenium) to build, |
| 80 | + test, and deploy ARM64 images. Once GitHub Actions officially supports Arm-based hosted runners, those workflows can |
| 81 | + easily be moved back to the same place. All the tests done for AMD64 images (including Docker, Docker Compose, and |
| 82 | + deploy to Kubernetes) are used to verify ARM64 images. |
| 83 | + |
| 84 | +- Utilize experimental feature [containerd image store](https://docs.docker.com/storage/containerd/) in Docker Engine to |
| 85 | + build and distribute multi-arch images in a simple way. |
| 86 | + |
| 87 | +Hopefully, this will make it easy for the community to find and use multi-arch images to simplify Selenium Grid Server |
| 88 | +deployment on various platforms. |
| 89 | + |
| 90 | +--- |
| 91 | + |
| 92 | +Stay tuned for updates by following SeleniumHQ on [X (Formerly Twitter)](https://twitter.com/seleniumhq) |
| 93 | +or [LinkedIn](https://www.linkedin.com/company/selenium/)! |
| 94 | + |
| 95 | +Happy testing! |
0 commit comments