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.
Changed Debian mirrors to Hong Kong. Added browser version to NodeFirefox Dockerfile. Added shell variables for build-step-2.sh. Fixed echo statements to print the VERSION and BUILD_DATE. Added README file in NodeFirefox with build instructions. Added generate.sh script to build-step-2.sh and used Dockerfile.arm64 as the source.
## Building NodeFirefox and StandaloneFirefox for ARM64
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.
4
+
5
+
As a result, I split the build process into various steps:
6
+
7
+
### Step 0
8
+
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.
10
+
11
+
```
12
+
$ sh build.sh
13
+
```
14
+
15
+
Before proceeding, verify that local-seleniarm/base:latest and local-seleniarm/node-base:latest exist by using `docker image ls`.
16
+
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
+
```
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
+
35
+
```
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`.
0 commit comments