You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 22, 2024. It is now read-only.
Renamed NodeFirefox/Dockerfile.arm64 to NodeFirefox/Dockerfile.multi-arch to reflect the nature of building for multiple architectures, not just arm64. Updated Makefile with new Dockerfile,multi-arch name. Removed obsolete generation and build scripts, outdated experimental Ubuntu Dockerfile, and updated documentation to move how to start containers towards the top.
## Building NodeFirefox and StandaloneFirefox for ARM64
1
+
## Building Multi-arch NodeFirefox and StandaloneFirefox
2
2
3
-
I haven't located a geckdriver binary for Debian, so we'll build it from source. Unfortunately, the build step cannot yet be automated. Trying to run it as part of a docker build or even using docker exec causes the build to fail for reasons unknown to me.
3
+
There are two Dockerfiles in NodeFirefox. `Dockerfile` is from the upstream repository for building the standard, official amd64 images. To build `seleniarm/node-firefox` for arm64 or armv7l (or possibly amd64 as well), we use the `Dockerfile.multi-arch` file.
4
4
5
-
As a result, I split the build process into various steps:
5
+
The easiest way to build the image is to use `make`. See examples below:
6
6
7
-
### Step 0
8
7
9
-
Make sure the local-seleniarm/base:latest and local-seleniarm/node-base:latest have been built using the command that builds all of the other images. If you haven't yet done this, run this from the root of the repository.
8
+
**To build node/firefox for arm64:**
10
9
11
10
```
12
-
$ sh build.sh
11
+
$ NAME=local-seleniarm VERSION=4.5.0 BUILD_DATE=$(date '+%Y%m%d') PLATFORMS=linux/arm64 BUILD_ARGS=--load make firefox_multi
13
12
```
14
13
15
-
Before proceeding, verify that local-seleniarm/base:latest and local-seleniarm/node-base:latest exist by using `docker image ls`.
14
+
**To build standalone/firefox for arm64:**
16
15
17
-
18
-
### Step 1
19
-
20
-
In Step 1, we'll build the geckodriver. The geckodriver must be built specifically for Debian and specifically for the ARM64 platform, and we'll use an intermediate, throwaway Debian container to automatically setup the build environment by installing all of the needed dependencies. Once the build environment is setup, we'll need to manually run the compile step. To start this process, run the following command from the NodeFirefox working directory:
21
-
22
-
```
23
-
$ cd NodeFirefox
24
-
$ sh build-step-1.sh # This installs dependencies and drops you into a container bash shell
25
-
```
26
-
27
-
Once the dependencies are installed, we'll automatically drop into the container's shell in the `/opt/geckodriver` directory. At this stage, run this command:
28
-
29
-
```
30
-
$ sh build-geckodriver-arm64.sh
31
16
```
32
-
33
-
This uses Rust and cargo to build geckodriver. Afterwards, the script copies the binary to `/media/share` on the host. The script then moves it to the NodeFirefox directory where it will be copied into the NodeFirefox image in the next step. Once built, exit the container:
34
-
17
+
$ NAME=local-seleniarm VERSION=4.5.0 BUILD_DATE=$(date '+%Y%m%d') PLATFORMS=linux/arm64 BUILD_ARGS=--load make standalone_firefox_multi
35
18
```
36
-
$ exit
37
-
```
38
-
39
-
Before proceeding to the next step, verify the geckodriver binary is inside the NodeFirefox folder.
40
-
41
-
42
-
### Step 2
43
-
44
-
At this stage, we're ready to build both NodeFirefox and StandaloneFirefox. To build these images, run the following command:
45
-
46
-
```
47
-
$ sh build-step-2.sh
48
-
```
49
-
50
-
After this completes, we see all of the container images, both with the latest tag and today's date, using `docker image ls`.
51
19
20
+
NOTE: Replace PLATFORMS environment variable with `linux/arm/v7` for armv7l/armhf, or `linux/amd64` for amd64.
Copy file name to clipboardExpand all lines: README.md
+23-16Lines changed: 23 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,28 @@ This is a fork of [SeleniumHQ/docker-selenium](https://github.com/SeleniumHQ/doc
6
6
7
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
8
9
-
These multi-arch Seleniarm container images are available on [Docker Hub](https://hub.docker.com/u/seleniarm):
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.
> 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.
@@ -16,6 +37,7 @@ These multi-arch Seleniarm container images are available on [Docker Hub](https:
16
37
17
38
The other upstream images are not yet supported for multi-arch, but you can try and build them yourself.
18
39
40
+
> NOTE: Google does not build Chrome for ARM. Instead, we use Chromium ARM.
19
41
20
42
## Building the ARM Images
21
43
@@ -55,21 +77,6 @@ To build for armv7l/armhf, replace PLATFORMS environment variable with `linux/ar
55
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
56
78
```
57
79
58
-
## Running the ARM Container Images
59
-
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.
61
-
62
-
The images are also successfully tested on AWS graviton nodes, resulting in better price-performance ratio and lower carbon footprint.
0 commit comments