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

Commit 8f82b00

Browse files
Merging from upstream v4.0.0-20211102
2 parents 269a676 + f0fe1dc commit 8f82b00

File tree

13 files changed

+268
-14
lines changed

13 files changed

+268
-14
lines changed

Base/Dockerfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
FROM ubuntu:focal-20210416
1+
# FROM ubuntu:focal-20210416
2+
#FROM ubuntu:focal-20210827
3+
FROM debian:latest
24
LABEL authors="Selenium <[email protected]>"
35

46
#================================================
57
# Customize sources for apt-get
68
#================================================
7-
RUN echo "deb http://archive.ubuntu.com/ubuntu focal main universe\n" > /etc/apt/sources.list \
8-
&& echo "deb http://archive.ubuntu.com/ubuntu focal-updates main universe\n" >> /etc/apt/sources.list \
9-
&& echo "deb http://security.ubuntu.com/ubuntu focal-security main universe\n" >> /etc/apt/sources.list
9+
#RUN echo "deb http://archive.ubuntu.com/ubuntu focal main universe\n" > /etc/apt/sources.list \
10+
# && echo "deb http://archive.ubuntu.com/ubuntu focal-updates main universe\n" >> /etc/apt/sources.list \
11+
# && echo "deb http://security.ubuntu.com/ubuntu focal-security main universe\n" >> /etc/apt/sources.list
1012

1113
# No interactive frontend during docker build
1214
ENV DEBIAN_FRONTEND=noninteractive \
13-
DEBCONF_NONINTERACTIVE_SEEN=true
15+
DEBCONF_NONINTERACTIVE_SEEN=true \
16+
ARCH=arm64
1417

1518
#========================
1619
# Miscellaneous packages
@@ -30,7 +33,7 @@ RUN apt-get -qqy update \
3033
supervisor \
3134
gnupg2 \
3235
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* \
33-
&& sed -i 's/securerandom\.source=file:\/dev\/random/securerandom\.source=file:\/dev\/urandom/' ./usr/lib/jvm/java-11-openjdk-amd64/conf/security/java.security
36+
&& sed -i 's/securerandom\.source=file:\/dev\/random/securerandom\.source=file:\/dev\/urandom/' ./usr/lib/jvm/java-11-openjdk-$ARCH/conf/security/java.security
3437

3538
#===================
3639
# Timezone settings

Hub/Dockerfile

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

88
USER 1200
99

NodeBase/Dockerfile

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

88
USER root
99

@@ -28,7 +28,7 @@ ENV LANG ${LANGUAGE}
2828
# Layer size: small: ~9 MB MB (with --no-install-recommends)
2929
RUN apt-get -qqy update \
3030
&& apt-get -qqy --no-install-recommends install \
31-
language-pack-en \
31+
#language-pack-en \
3232
tzdata \
3333
locales \
3434
&& locale-gen ${LANGUAGE} \
@@ -84,7 +84,7 @@ RUN apt-get -qqy update \
8484
fonts-ipafont-gothic \
8585
fonts-wqy-zenhei \
8686
fonts-tlwg-loma-otf \
87-
ttf-ubuntu-font-family \
87+
# ttf-ubuntu-font-family \
8888
&& rm -rf /var/lib/apt/lists/* \
8989
&& apt-get -qyy clean
9090

NodeBase/Dockerfile.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ENV LANG ${LANGUAGE}
2121
# Layer size: small: ~9 MB MB (with --no-install-recommends)
2222
RUN apt-get -qqy update \
2323
&& apt-get -qqy --no-install-recommends install \
24-
language-pack-en \
24+
#language-pack-en \
2525
tzdata \
2626
locales \
2727
&& locale-gen ${LANGUAGE} \
@@ -77,7 +77,7 @@ RUN apt-get -qqy update \
7777
fonts-ipafont-gothic \
7878
fonts-wqy-zenhei \
7979
fonts-tlwg-loma-otf \
80-
ttf-ubuntu-font-family \
80+
# ttf-ubuntu-font-family \
8181
&& rm -rf /var/lib/apt/lists/* \
8282
&& apt-get -qyy clean
8383

NodeChromium/Dockerfile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2+
# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED.
3+
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE
4+
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5+
FROM local-seleniarm/node-base:4.0.0-20211110
6+
LABEL authors=SeleniumHQ,sj26,jamesmortensen
7+
8+
USER root
9+
10+
# Install Chromium Arm64
11+
# RUN echo "deb http://http.us.debian.org/debian/ stable non-free contrib main" >> /etc/apt/sources.list \
12+
RUN echo "deb http://ftp.hk.debian.org/debian/ sid main" >> /etc/apt/sources.list \
13+
&& apt-get update -qqy \
14+
# && apt-get -qqy install chromium=89.0.4389.82-1 \
15+
# && apt-get -qqy install chromium=90.0.4430.212-1 \
16+
&& apt-get -qqy install chromium=93.0.4577.82-1 \
17+
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
18+
19+
#=================================
20+
# Chromium Launch Script Wrapper
21+
#=================================
22+
COPY wrap_chromium_binary /opt/bin/wrap_chromium_binary
23+
RUN /opt/bin/wrap_chromium_binary
24+
25+
#============================================
26+
# Chromium webdriver
27+
#============================================
28+
RUN apt-get update -qqy \
29+
&& apt-get -qqy install chromium-driver \
30+
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
31+
32+
RUN echo "chrome" > /opt/selenium/browser_name
33+
34+
USER 1200
35+

NodeChromium/Dockerfile.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
USER root
2+
3+
# Install Chromium Arm64
4+
# RUN echo "deb http://http.us.debian.org/debian/ stable non-free contrib main" >> /etc/apt/sources.list \
5+
RUN echo "deb http://ftp.hk.debian.org/debian/ sid main" >> /etc/apt/sources.list \
6+
&& apt-get update -qqy \
7+
# && apt-get -qqy install chromium=89.0.4389.82-1 \
8+
# && apt-get -qqy install chromium=90.0.4430.212-1 \
9+
&& apt-get -qqy install chromium=93.0.4577.82-1 \
10+
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
11+
12+
#=================================
13+
# Chromium Launch Script Wrapper
14+
#=================================
15+
COPY wrap_chromium_binary /opt/bin/wrap_chromium_binary
16+
RUN /opt/bin/wrap_chromium_binary
17+
18+
#============================================
19+
# Chromium webdriver
20+
#============================================
21+
RUN apt-get update -qqy \
22+
&& apt-get -qqy install chromium-driver \
23+
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
24+
25+
RUN echo "chrome" > /opt/selenium/browser_name
26+
27+
USER 1200
28+

NodeChromium/Dockerfile.ubuntubad

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2+
# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED.
3+
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE
4+
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5+
FROM local-seleniarm/node-base:4.0.0-rc-2-prerelease-20210930
6+
LABEL authors=james
7+
8+
USER root
9+
10+
RUN apt-get update && apt-get install curl wget \
11+
&& curl http://ftp.cn.debian.org/debian/pool/main/c/chromium/chromium_90.0.4430.212-1_arm64.deb -o chromium.deb
12+
13+
RUN ls chromium.deb && apt install -f ./chromium.deb
14+
15+
# Install Chromium Arm64
16+
#RUN echo "deb http://http.us.debian.org/debian/ testing non-free contrib main" >> /etc/apt/sources.list \
17+
#RUN
18+
# && apt-get update -qqy \
19+
# && apt-get -qqy install chromium=89.0.4389.82-1 \
20+
# && apt-get -qqy install chromium=94.0.4606.54 \
21+
# && rm -rf /var/lib/apt/lists/* /var/cache/apt/*
22+
23+
#=================================
24+
# Chromium Launch Script Wrapper
25+
#=================================
26+
COPY wrap_chromium_binary /opt/bin/wrap_chromium_binary
27+
RUN /opt/bin/wrap_chromium_binary
28+
29+
#============================================
30+
# Chromium webdriver
31+
#============================================
32+
RUN apt-get update -qqy \
33+
&& apt-get -qqy install chromium-driver \
34+
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
35+
36+
37+
USER 1200
38+

NodeChromium/generate.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
VERSION=$1
3+
NAMESPACE=$2
4+
AUTHORS=$3
5+
6+
echo "# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" > ./Dockerfile
7+
echo "# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED." >> ./Dockerfile
8+
echo "# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE" >> ./Dockerfile
9+
echo "# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" >> ./Dockerfile
10+
echo FROM ${NAMESPACE}/node-base:${VERSION} >> ./Dockerfile
11+
echo LABEL authors="$AUTHORS" >> ./Dockerfile
12+
echo "" >> ./Dockerfile
13+
cat ./Dockerfile.txt >> ./Dockerfile

NodeChromium/wrap_chromium_binary

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
WRAPPER_PATH=$(readlink -f /usr/bin/chromium)
4+
BASE_PATH="$WRAPPER_PATH-base"
5+
mv "$WRAPPER_PATH" "$BASE_PATH"
6+
7+
cat > "$WRAPPER_PATH" <<_EOF
8+
#!/bin/bash
9+
# Note: exec -a below is a bashism.
10+
exec -a "\$0" "$BASE_PATH" --no-sandbox "\$@"
11+
_EOF
12+
chmod +x "$WRAPPER_PATH"

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
# Docker images for Selenium, built for Debian ARM64
2+
3+
At this point, I've only updated the images for Chromium 93, the latest ARM64 build for Debian ARM64.
4+
5+
## Only Building the Images
6+
7+
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.
8+
9+
The Standalone folder is the base for all Standalone${browser} images and includes a script that starts the selenium server in standalone mode.
10+
The NodeBase folder is the base for all Node${browser} images and includes a script that starts the selenium server in node mode.
11+
12+
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.
13+
14+
To build the images, run build.sh from the root directory of this repo:
15+
16+
```
17+
$ sh build.sh
18+
```
19+
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
21+
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.
23+
24+
To start the container image, run:
25+
26+
```
27+
$ docker run --rm -it -p 4444:4444 -p 5900:5900 -p 7900:7900 --shm-size 3g local-seleniarm/standalone-chromium:latest
28+
```
29+
30+
Use your traditional VNC client via port 5900, and noVNC in the browser via port 7900.
31+
32+
33+
----
34+
The official documentation from seleniumHQ begins here:
35+
----
36+
37+
138
# Docker images for the Selenium Grid Server
239

340
The project is made possible by volunteer contributors who have put in thousands of hours of their own time,

0 commit comments

Comments
 (0)