|
2 | 2 |
|
3 | 3 | [](https://app.circleci.com/pipelines/github/seleniumhq-community/docker-seleniarm) |
4 | 4 |
|
5 | | -Selenium container images are available on [Docker Hub](https://hub.docker.com/u/seleniarm): |
| 5 | +This is a fork of [SeleniumHQ/docker-selenium](https://github.com/SeleniumHQ/docker-selenium) for building and maintaining docker-selenium ARM images. This fork is inspired by and based on changes from [sj26/docker-selenium](https://github.com/sj26/docker-selenium) and [rows/docker-selenium](https://github.com/rows/docker-selenium). |
| 6 | + |
| 7 | +NOTE: If you only need the Intel/amd64 images, please see the official upstream [SeleniumHQ/docker-selenium](https://github.com/SeleniumHQ/docker-selenium) repository for best results. |
| 8 | + |
| 9 | +These multi-arch Seleniarm container images are available on [Docker Hub](https://hub.docker.com/u/seleniarm): |
6 | 10 |
|
7 | 11 | - [Standalone Chromium](https://hub.docker.com/r/seleniarm/standalone-chromium) |
8 | 12 | - [Standalone Firefox](https://hub.docker.com/r/seleniarm/standalone-firefox) |
9 | 13 | - [Node Chromium](https://hub.docker.com/r/seleniarm/node-chromium) |
10 | 14 | - [Node Firefox](https://hub.docker.com/r/seleniarm/node-firefox) |
11 | 15 | - [Selenium Hub](https://hub.docker.com/r/seleniarm/hub) |
12 | 16 |
|
13 | | -For other images, see the next section to build them yourself. |
| 17 | +The other upstream images are not yet supported for multi-arch, but you can try and build them yourself. |
| 18 | + |
| 19 | + |
| 20 | +## Building the ARM Images |
14 | 21 |
|
15 | | -## Only Building the Images |
| 22 | +The entire build process is managed via a Makefile. If you want to build the images locally, without pushing to any registry, then use `make`. |
16 | 23 |
|
17 | | -If you want to build the images locally, without pushing to any registry, then use the build.sh script in the root of the project directory. |
| 24 | +### Structure of container images: |
18 | 25 |
|
19 | | -The Standalone folder is the base for all Standalone${browser} images and includes a script that starts the selenium server in standalone mode. |
20 | | -The NodeBase folder is the base for all Node${browser} images and includes a script that starts the selenium server in node mode. |
| 26 | +- The Standalone folder is the base for all Standalone${browser} images and includes a script that starts the selenium server in standalone mode. |
| 27 | +- The NodeBase folder is the base for all Node${browser} images and includes a script that starts the selenium server in node mode. |
21 | 28 |
|
22 | | -Inside build.sh are environment variables which are used to tag the built images. If changing the Selenium version, note that you must also edit the Base/Dockerfile and change which selenium-server version is downloaded via wget. The Chromium version is set in NodeChromium/Dockerfile.txt. |
| 29 | +To build with a different version of Chromium, change it in NodeChromium/Dockerfile. |
23 | 30 |
|
24 | | -The build.sh script only builds the standalone images, node images, and the hub. You are welcome to try and build and test the other images, if you need them. |
| 31 | +The multi-arch Seleniarm images are only built for the standalone and node browser images, and the hub. You are welcome to try and build and test the other images, if you need them. |
| 32 | + |
| 33 | +To build the images, run the following make command from the root directory of this repo, and specify your architecture, either arm64, arm/v7, or amd64: |
| 34 | + |
| 35 | +**To build all arm64 images:** |
| 36 | +``` |
| 37 | +$ NAME=local-seleniarm VERSION=4.5.0 BUILD_DATE=$(date '+%Y%m%d') PLATFORMS=linux/arm64 BUILD_ARGS=--load make build_multi |
| 38 | +``` |
25 | 39 |
|
26 | | -To build the images, run build.sh from the root directory of this repo, and specify your architecture, either arm64, arm/v7, or amd64: |
| 40 | +**To build standalone/firefox for arm64:** |
27 | 41 |
|
28 | 42 | ``` |
29 | | -$ ./build.sh arm64 # or arm/v7 or amd64 |
| 43 | +$ NAME=local-seleniarm VERSION=4.5.0 BUILD_DATE=$(date '+%Y%m%d') PLATFORMS=linux/arm64 BUILD_ARGS=--load make standalone_firefox_multi |
30 | 44 | ``` |
31 | 45 |
|
32 | | -This is a fork of [SeleniumHQ/docker-selenium](https://github.com/SeleniumHQ/docker-selenium) and based on changes from [sj26/docker-selenium](https://github.com/sj26/docker-selenium) and [rows/docker-selenium](https://github.com/rows/docker-selenium). |
| 46 | +**To build standalone/chromium for arm64:** |
| 47 | + |
| 48 | +``` |
| 49 | +$ NAME=local-seleniarm VERSION=4.5.0 BUILD_DATE=$(date '+%Y%m%d') PLATFORMS=linux/arm64 BUILD_ARGS=--load make standalone_chromium_multi |
| 50 | +``` |
| 51 | + |
| 52 | +To build for armv7l/armhf, replace PLATFORMS environment variable with `linux/arm/v7` like so: |
| 53 | + |
| 54 | +``` |
| 55 | +$ NAME=local-seleniarm VERSION=4.5.0 BUILD_DATE=$(date '+%Y%m%d') PLATFORMS=linux/arm/v7 BUILD_ARGS=--load make standalone_chromium_multi |
| 56 | +``` |
33 | 57 |
|
34 | | -Multi-arch images are located at https://hub.docker.com/u/seleniarm |
| 58 | +## Running the ARM Container Images |
35 | 59 |
|
36 | | -The primary motivation for creating this fork and updating the images is so I can use the noVNC client on Selenium 4.0.0 on the Mac M1, an arm64 architecture. To use noVNC, make sure you open port 7900, and visit localhost:7900 in your browser. |
| 60 | +The primary motivation for creating this fork and updating the images was so I can use the noVNC client on the latest Selenium versions on the Mac M1, an arm64 architecture. To use noVNC, make sure you open port 7900, and visit localhost:7900 in your browser. |
37 | 61 |
|
38 | 62 | The images are also successfully tested on AWS graviton nodes, resulting in better price-performance ratio and lower carbon footprint. |
39 | 63 |
|
40 | 64 | To start the container image, run: |
41 | 65 |
|
42 | 66 | ``` |
43 | | -$ docker run --rm -it -p 4444:4444 -p 5900:5900 -p 7900:7900 --shm-size 3g local-seleniarm/standalone-chromium:latest |
| 67 | +$ docker run --rm -it -p 4444:4444 -p 5900:5900 -p 7900:7900 --shm-size 2g seleniarm/standalone-chromium:latest |
44 | 68 | ``` |
45 | 69 |
|
46 | 70 | Use your traditional VNC client via port 5900, and noVNC in the browser via port 7900. |
|
0 commit comments