|
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 | +## Running the ARM Container Images |
| 10 | + |
| 11 | +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. |
| 12 | + |
| 13 | +The images are also successfully tested on AWS graviton nodes, resulting in better price-performance ratio and lower carbon footprint. |
| 14 | + |
| 15 | +To start the standalone container images, run: |
| 16 | + |
| 17 | + Chromium |
| 18 | +``` |
| 19 | +$ docker run --rm -it -p 4444:4444 -p 5900:5900 -p 7900:7900 --shm-size 2g seleniarm/standalone-chromium:latest |
| 20 | +``` |
| 21 | +> NOTE: Google does not build Chrome for Linux ARM platforms. Instead, docker-seleniarm uses the open source Chromium browser instead, which _is_ built for ARM. |
| 22 | +
|
| 23 | + Firefox |
| 24 | +``` |
| 25 | +$ docker run --rm -it -p 4444:4444 -p 5900:5900 -p 7900:7900 --shm-size 2g seleniarm/standalone-firefox:latest |
| 26 | +``` |
| 27 | + |
| 28 | +Use your traditional VNC client via port 5900, and noVNC in the browser via port 7900. |
| 29 | + |
| 30 | +The following multi-arch Seleniarm container images are available on [Docker Hub](https://hub.docker.com/u/seleniarm): |
6 | 31 |
|
7 | 32 | - [Standalone Chromium](https://hub.docker.com/r/seleniarm/standalone-chromium)
|
8 | 33 | - [Standalone Firefox](https://hub.docker.com/r/seleniarm/standalone-firefox)
|
9 | 34 | - [Node Chromium](https://hub.docker.com/r/seleniarm/node-chromium)
|
10 | 35 | - [Node Firefox](https://hub.docker.com/r/seleniarm/node-firefox)
|
11 | 36 | - [Selenium Hub](https://hub.docker.com/r/seleniarm/hub)
|
12 | 37 |
|
13 |
| -For other images, see the next section to build them yourself. |
| 38 | +The other upstream images are not yet supported for multi-arch, but you can try and build them yourself. |
14 | 39 |
|
15 |
| -## Only Building the Images |
| 40 | +> NOTE: Google does not build Chrome for ARM on Linux. Instead, we use Chromium ARM. |
16 | 41 |
|
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. |
| 42 | +## Building the ARM Images |
18 | 43 |
|
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. |
| 44 | +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`. |
21 | 45 |
|
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. |
| 46 | +### Structure of container images: |
23 | 47 |
|
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. |
| 48 | +- The Standalone folder is the base for all Standalone${browser} images and includes a script that starts the selenium server in standalone mode. |
| 49 | +- The NodeBase folder is the base for all Node${browser} images and includes a script that starts the selenium server in node mode. |
25 | 50 |
|
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: |
| 51 | +To build with a different version of Chromium, change it in NodeChromium/Dockerfile. |
27 | 52 |
|
28 |
| -``` |
29 |
| -$ ./build.sh arm64 # or arm/v7 or amd64 |
30 |
| -``` |
| 53 | +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. |
31 | 54 |
|
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). |
| 55 | +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: |
33 | 56 |
|
34 |
| -Multi-arch images are located at https://hub.docker.com/u/seleniarm |
| 57 | +**To build all arm64 images:** |
| 58 | +``` |
| 59 | +$ NAME=local-seleniarm VERSION=4.5.0 BUILD_DATE=$(date '+%Y%m%d') PLATFORMS=linux/arm64 BUILD_ARGS=--load make build_multi |
| 60 | +``` |
35 | 61 |
|
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. |
| 62 | +**To build standalone/firefox for arm64:** |
37 | 63 |
|
38 |
| -The images are also successfully tested on AWS graviton nodes, resulting in better price-performance ratio and lower carbon footprint. |
| 64 | +``` |
| 65 | +$ NAME=local-seleniarm VERSION=4.5.0 BUILD_DATE=$(date '+%Y%m%d') PLATFORMS=linux/arm64 BUILD_ARGS=--load make standalone_firefox_multi |
| 66 | +``` |
39 | 67 |
|
40 |
| -To start the container image, run: |
| 68 | +**To build standalone/chromium for arm64:** |
41 | 69 |
|
42 | 70 | ```
|
43 |
| -$ docker run --rm -it -p 4444:4444 -p 5900:5900 -p 7900:7900 --shm-size 3g local-seleniarm/standalone-chromium:latest |
| 71 | +$ NAME=local-seleniarm VERSION=4.5.0 BUILD_DATE=$(date '+%Y%m%d') PLATFORMS=linux/arm64 BUILD_ARGS=--load make standalone_chromium_multi |
44 | 72 | ```
|
45 | 73 |
|
46 |
| -Use your traditional VNC client via port 5900, and noVNC in the browser via port 7900. |
| 74 | +To build for armv7l/armhf, replace PLATFORMS environment variable with `linux/arm/v7` like so: |
47 | 75 |
|
| 76 | +``` |
| 77 | +$ NAME=local-seleniarm VERSION=4.5.0 BUILD_DATE=$(date '+%Y%m%d') PLATFORMS=linux/arm/v7 BUILD_ARGS=--load make standalone_chromium_multi |
| 78 | +``` |
48 | 79 |
|
49 | 80 | ----
|
50 |
| -The official documentation from seleniumHQ begins here: |
| 81 | +# -- The official documentation from seleniumHQ begins here -- |
51 | 82 | ----
|
52 | 83 |
|
53 | 84 |
|
|
0 commit comments