Skip to content
This repository was archived by the owner on Jun 22, 2024. It is now read-only.

Commit 3bca5bf

Browse files
resolve conflicts
2 parents d8edfa8 + c81deab commit 3bca5bf

File tree

9 files changed

+77
-30
lines changed

9 files changed

+77
-30
lines changed

Base/Dockerfile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ LABEL authors="Selenium <[email protected]>"
1212
# && echo "deb http://security.ubuntu.com/ubuntu focal-security main universe\n" >> /etc/apt/sources.list
1313

1414
ARG TARGETARCH
15+
ARG TARGETVARIANT
1516

1617
# No interactive frontend during docker build
1718
ENV DEBIAN_FRONTEND=noninteractive \
18-
DEBCONF_NONINTERACTIVE_SEEN=true \
19-
ARCH=$TARGETARCH
19+
DEBCONF_NONINTERACTIVE_SEEN=true
20+
2021

2122
#========================
2223
# Miscellaneous packages
@@ -37,7 +38,15 @@ RUN apt-get -qqy update \
3738
gnupg2 \
3839
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
3940

40-
RUN echo $ARCH && sed -i 's/securerandom\.source=file:\/dev\/random/securerandom\.source=file:\/dev\/urandom/' ./usr/lib/jvm/java-11-openjdk-$ARCH/conf/security/java.security
41+
#===================
42+
43+
RUN if [ $TARGETARCH = "arm" ] && [ $TARGETVARIANT = "v7" ]; then \
44+
export ARCH=armhf ; \
45+
else \
46+
export ARCH=$TARGETARCH ; \
47+
fi \
48+
&& sed -i 's/securerandom\.source=file:\/dev\/random/securerandom\.source=file:\/dev\/urandom/' ./usr/lib/jvm/java-11-openjdk-$ARCH/conf/security/java.security
49+
4150

4251
#===================
4352
# Timezone settings

Hub/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED.
33
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE
44
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5-
FROM seleniarm/base:4.1.0-alpha-20211218
5+
FROM local-seleniarm/base:4.1.1-20220119
66
LABEL authors=SeleniumHQ,sj26,jamesmortensen
77

88
USER 1200

NodeBase/Dockerfile

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED.
33
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE
44
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5-
FROM seleniarm/base:4.1.0-alpha-20211218
5+
FROM local-seleniarm/base:latest
66
LABEL authors=SeleniumHQ,sj26,jamesmortensen
77

88
USER root
@@ -139,15 +139,21 @@ COPY selenium.conf /etc/supervisor/conf.d/
139139
RUN mkdir -p ${HOME}/.vnc \
140140
&& x11vnc -storepasswd secret ${HOME}/.vnc/passwd
141141

142-
USER root
142+
# Added to avoid the following sudo error while running multi-arch builds:
143+
# "sudo: effective uid is not 0, is /usr/bin/sudo on a file system with
144+
# the 'nosuid' option set or an NFS file system without root privileges?"
145+
USER root
146+
143147
#==========
144148
# Relaxing permissions for OpenShift and other non-sudo environments
145149
#==========
146-
RUN chmod -R 777 ${HOME} \
147-
&& chgrp -R 0 ${HOME} \
148-
&& chmod -R g=u ${HOME}
150+
RUN chmod -R 777 ${HOME} \
151+
&& chgrp -R 0 ${HOME} \
152+
&& chmod -R g=u ${HOME}
149153

154+
# Added to avoid sudo-related multi-arch build errors
150155
USER 1200
156+
151157
#==============================
152158
# Scripts to run fluxbox, x11vnc and noVNC
153159
#==============================
@@ -188,10 +194,13 @@ ENV SE_NODE_OVERRIDE_MAX_SESSIONS false
188194
# Following line fixes https://github.com/SeleniumHQ/docker-selenium/issues/87
189195
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null
190196

197+
# Added to avoid sudo-related multi-arch build errors
191198
USER root
199+
192200
# Creating base directory for Xvfb
193-
RUN mkdir -p /tmp/.X11-unix && chmod 1777 /tmp/.X11-unix
201+
RUN mkdir -p /tmp/.X11-unix && chmod 1777 /tmp/.X11-unix
194202

203+
# Added to avoid sudo-related multi-arch build errors
195204
USER 1200
196205

197206
# Copying configuration script generator

NodeChromium/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22
# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED.
33
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE
44
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5-
FROM seleniarm/node-base:4.1.0-alpha-20211218
5+
FROM local-seleniarm/node-base:latest
66
LABEL authors=SeleniumHQ,sj26,jamesmortensen
77

88
USER root
99

10-
# Install Chromium Arm64
10+
# Install Chromium
1111
# RUN echo "deb http://http.us.debian.org/debian/ stable non-free contrib main" >> /etc/apt/sources.list \
1212
RUN echo "deb http://ftp.hk.debian.org/debian/ sid main" >> /etc/apt/sources.list \
1313
&& apt-get update -qqy \
1414
# && apt-get -qqy install chromium=89.0.4389.82-1 \
1515
# && apt-get -qqy install chromium=90.0.4430.212-1 \
16-
&& apt-get -qqy install chromium=93.0.4577.82-1 \
16+
# && apt-get -qqy install chromium=93.0.4577.82-1 \
17+
&& apt-get -qqy install chromium=97.0.4692.71-0.1 \
1718
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
1819

1920
#=================================

NodeChromium/Dockerfile.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
USER root
22

3-
# Install Chromium Arm64
3+
# Install Chromium
44
# RUN echo "deb http://http.us.debian.org/debian/ stable non-free contrib main" >> /etc/apt/sources.list \
55
RUN echo "deb http://ftp.hk.debian.org/debian/ sid main" >> /etc/apt/sources.list \
66
&& apt-get update -qqy \
77
# && apt-get -qqy install chromium=89.0.4389.82-1 \
88
# && apt-get -qqy install chromium=90.0.4430.212-1 \
9-
&& apt-get -qqy install chromium=93.0.4577.82-1 \
9+
# && apt-get -qqy install chromium=93.0.4577.82-1 \
10+
&& apt-get -qqy install chromium=97.0.4692.71-0.1 \
1011
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
1112

1213
#=================================

README.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
# Docker images for Selenium, built for Debian ARM64
1+
# Docker images for Selenium, built for Debian ARM64, ARM/v7, and AMD64
22

3-
At this point, I've only updated the images for Chromium 93, the latest ARM64 build for Debian ARM64.
3+
Selenium container images are available on [Docker Hub](https://hub.docker.com/u/seleniarm):
4+
5+
- [Standalone Chromium](https://hub.docker.com/r/seleniarm/standalone-chromium)
6+
- [Standalone Firefox - ARM64 only](https://hub.docker.com/r/seleniarm/standalone-firefox)
7+
- [Node Chromium](https://hub.docker.com/r/seleniarm/node-chromium)
8+
- [Node Firefox](https://hub.docker.com/r/seleniarm/node-firefox)
9+
- [Selenium Hub](https://hub.docker.com/r/seleniarm/hub)
10+
11+
For other images, see the next section to build them yourself.
412

513
## Only Building the Images
614

@@ -11,15 +19,19 @@ The NodeBase folder is the base for all Node${browser} images and includes a scr
1119

1220
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.
1321

14-
To build the images, run build.sh from the root directory of this repo:
22+
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.
23+
24+
To build the images, run build.sh from the root directory of this repo, and specify your architecture, either arm64, arm/v7, or amd64:
1525

1626
```
17-
$ sh build.sh
27+
$ ./build.sh arm64 # or arm/v7 or amd64
1828
```
1929

20-
I have not pushed any images to the Docker registry. If you wish to push them to a registry, you may do so. For more information on older ARM64 Selenium images, see https://github.com/sj26/docker-selenium and https://hub.docker.com/u/seleniarm
30+
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).
31+
32+
Multi-arch images are located at https://hub.docker.com/u/seleniarm
2133

22-
the primary motivation for creating this fork and updating the images is so I can use the noVNC client on Selenium 4.0.0. To use noVNC, make sure you open port 7900, and visit localhost:7900 in your browser.
34+
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.
2335

2436
To start the container image, run:
2537

StandaloneChromium/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED.
33
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE
44
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5-
FROM seleniarm/node-chromium:4.1.0-alpha-20211218
5+
FROM local-seleniarm/node-chromium:latest
66
LABEL authors=SeleniumHQ,sj26,jamesmortensen
77

88
USER 1200

build-and-deploy-multi-arch.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
BUILD_DATE=$(date +'%Y%m%d')
2-
VERSION=4.1.0-alpha
2+
VERSION=4.1.1-alpha
33
CHROMIUM=93.0.4577.82 # Not yet used at this time. Edit in NodeChromium/Dockerfile.txt
44
NAMESPACE=seleniarm
55
AUTHORS=SeleniumHQ,sj26,jamesmortensen
6-
ARCH=linux/arm64,linux/amd64
6+
ARCH=linux/arm64,linux/amd64,linux/arm/v7
77

88
cd ./Base && docker buildx build --push --platform $ARCH -t $NAMESPACE/base:$VERSION-$BUILD_DATE .
99
echo $PWD

build.sh

100644100755
Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,38 @@
1+
#!/bin/bash -x
2+
13
BUILD_DATE=$(date +'%Y%m%d')
2-
VERSION=4.1.0
4+
VERSION=4.1.1
35
CHROMIUM=93.0.4577.82 # Not yet used at this time. Edit in NodeChromium/Dockerfile.txt
46
NAMESPACE=local-seleniarm
57
AUTHORS=SeleniumHQ,sj26,jamesmortensen
68

7-
cd ./Base && docker buildx build --platform linux/arm64 -t $NAMESPACE/base:$VERSION-$BUILD_DATE .
9+
if [ "$1" == "arm64" ] || [ "$1" == "amd64" ] || [ "$1" == "arm/v7" ]; then
10+
echo "Building images for platform $1"
11+
PLATFORM=linux/$1
12+
else
13+
echo "Run build.sh script as one of the following options:"
14+
echo ""
15+
echo "sh build.sh arm64"
16+
echo "sh build.sh arm/v7"
17+
echo "sh build.sh amd64"
18+
exit;
19+
fi
20+
21+
22+
cd ./Base && docker buildx build --platform $PLATFORM -t $NAMESPACE/base:$VERSION-$BUILD_DATE .
823
echo $PWD
924
cd ../Hub && sh generate.sh $VERSION-$BUILD_DATE $NAMESPACE $AUTHORS \
10-
&& docker buildx build --platform linux/arm64 -t $NAMESPACE/hub:$VERSION-$BUILD_DATE .
25+
&& docker buildx build --platform $PLATFORM -t $NAMESPACE/hub:$VERSION-$BUILD_DATE .
1126

1227
cd ../NodeBase && sh generate.sh $VERSION-$BUILD_DATE $NAMESPACE $AUTHORS \
13-
&& docker buildx build --platform linux/arm64 -t $NAMESPACE/node-base:$VERSION-$BUILD_DATE .
28+
&& docker buildx build --platform $PLATFORM -t $NAMESPACE/node-base:$VERSION-$BUILD_DATE .
1429
# && sed 's/chromium=.*/chromium=91.0.4472.124/' Dockerfile > Dockerfile \
1530
cd ../NodeChromium && sh generate.sh $VERSION-$BUILD_DATE $NAMESPACE $AUTHORS \
16-
&& docker buildx build --platform linux/arm64 -t $NAMESPACE/node-chromium:$VERSION-$BUILD_DATE .
31+
&& docker buildx build --platform $PLATFORM -t $NAMESPACE/node-chromium:$VERSION-$BUILD_DATE .
1732

1833
cd ../Standalone && sh generate.sh StandaloneChromium node-chromium $VERSION-$BUILD_DATE $NAMESPACE $AUTHORS \
1934
&& cd ../StandaloneChromium \
20-
&& docker buildx build --platform linux/arm64 -t $NAMESPACE/standalone-chromium:$VERSION-$BUILD_DATE .
35+
&& docker buildx build --platform $PLATFORM -t $NAMESPACE/standalone-chromium:$VERSION-$BUILD_DATE .
2136

2237
echo "Build node-hub, node-chromium, and standalone-chromium...\n"
2338
echo "Tagging builds...\n"

0 commit comments

Comments
 (0)