This repository has been archived by the owner on Jun 22, 2024. It is now read-only.
forked from SeleniumHQ/docker-selenium
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merging from upstream v4.0.0-20211102
- Loading branch information
Showing
13 changed files
with
268 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
FROM ubuntu:focal-20210416 | ||
# FROM ubuntu:focal-20210416 | ||
#FROM ubuntu:focal-20210827 | ||
FROM debian:latest | ||
LABEL authors="Selenium <[email protected]>" | ||
|
||
#================================================ | ||
# Customize sources for apt-get | ||
#================================================ | ||
RUN echo "deb http://archive.ubuntu.com/ubuntu focal main universe\n" > /etc/apt/sources.list \ | ||
&& echo "deb http://archive.ubuntu.com/ubuntu focal-updates main universe\n" >> /etc/apt/sources.list \ | ||
&& echo "deb http://security.ubuntu.com/ubuntu focal-security main universe\n" >> /etc/apt/sources.list | ||
#RUN echo "deb http://archive.ubuntu.com/ubuntu focal main universe\n" > /etc/apt/sources.list \ | ||
# && echo "deb http://archive.ubuntu.com/ubuntu focal-updates main universe\n" >> /etc/apt/sources.list \ | ||
# && echo "deb http://security.ubuntu.com/ubuntu focal-security main universe\n" >> /etc/apt/sources.list | ||
|
||
# No interactive frontend during docker build | ||
ENV DEBIAN_FRONTEND=noninteractive \ | ||
DEBCONF_NONINTERACTIVE_SEEN=true | ||
DEBCONF_NONINTERACTIVE_SEEN=true \ | ||
ARCH=arm64 | ||
|
||
#======================== | ||
# Miscellaneous packages | ||
|
@@ -30,7 +33,7 @@ RUN apt-get -qqy update \ | |
supervisor \ | ||
gnupg2 \ | ||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* \ | ||
&& sed -i 's/securerandom\.source=file:\/dev\/random/securerandom\.source=file:\/dev\/urandom/' ./usr/lib/jvm/java-11-openjdk-amd64/conf/security/java.security | ||
&& sed -i 's/securerandom\.source=file:\/dev\/random/securerandom\.source=file:\/dev\/urandom/' ./usr/lib/jvm/java-11-openjdk-$ARCH/conf/security/java.security | ||
|
||
#=================== | ||
# Timezone settings | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. | ||
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE | ||
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
FROM local-seleniarm/node-base:4.0.0-20211110 | ||
LABEL authors=SeleniumHQ,sj26,jamesmortensen | ||
|
||
USER root | ||
|
||
# Install Chromium Arm64 | ||
# RUN echo "deb http://http.us.debian.org/debian/ stable non-free contrib main" >> /etc/apt/sources.list \ | ||
RUN echo "deb http://ftp.hk.debian.org/debian/ sid main" >> /etc/apt/sources.list \ | ||
&& apt-get update -qqy \ | ||
# && apt-get -qqy install chromium=89.0.4389.82-1 \ | ||
# && apt-get -qqy install chromium=90.0.4430.212-1 \ | ||
&& apt-get -qqy install chromium=93.0.4577.82-1 \ | ||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* | ||
|
||
#================================= | ||
# Chromium Launch Script Wrapper | ||
#================================= | ||
COPY wrap_chromium_binary /opt/bin/wrap_chromium_binary | ||
RUN /opt/bin/wrap_chromium_binary | ||
|
||
#============================================ | ||
# Chromium webdriver | ||
#============================================ | ||
RUN apt-get update -qqy \ | ||
&& apt-get -qqy install chromium-driver \ | ||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* | ||
|
||
RUN echo "chrome" > /opt/selenium/browser_name | ||
|
||
USER 1200 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
USER root | ||
|
||
# Install Chromium Arm64 | ||
# RUN echo "deb http://http.us.debian.org/debian/ stable non-free contrib main" >> /etc/apt/sources.list \ | ||
RUN echo "deb http://ftp.hk.debian.org/debian/ sid main" >> /etc/apt/sources.list \ | ||
&& apt-get update -qqy \ | ||
# && apt-get -qqy install chromium=89.0.4389.82-1 \ | ||
# && apt-get -qqy install chromium=90.0.4430.212-1 \ | ||
&& apt-get -qqy install chromium=93.0.4577.82-1 \ | ||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* | ||
|
||
#================================= | ||
# Chromium Launch Script Wrapper | ||
#================================= | ||
COPY wrap_chromium_binary /opt/bin/wrap_chromium_binary | ||
RUN /opt/bin/wrap_chromium_binary | ||
|
||
#============================================ | ||
# Chromium webdriver | ||
#============================================ | ||
RUN apt-get update -qqy \ | ||
&& apt-get -qqy install chromium-driver \ | ||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* | ||
|
||
RUN echo "chrome" > /opt/selenium/browser_name | ||
|
||
USER 1200 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. | ||
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE | ||
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
FROM local-seleniarm/node-base:4.0.0-rc-2-prerelease-20210930 | ||
LABEL authors=james | ||
|
||
USER root | ||
|
||
RUN apt-get update && apt-get install curl wget \ | ||
&& curl http://ftp.cn.debian.org/debian/pool/main/c/chromium/chromium_90.0.4430.212-1_arm64.deb -o chromium.deb | ||
|
||
RUN ls chromium.deb && apt install -f ./chromium.deb | ||
|
||
# Install Chromium Arm64 | ||
#RUN echo "deb http://http.us.debian.org/debian/ testing non-free contrib main" >> /etc/apt/sources.list \ | ||
#RUN | ||
# && apt-get update -qqy \ | ||
# && apt-get -qqy install chromium=89.0.4389.82-1 \ | ||
# && apt-get -qqy install chromium=94.0.4606.54 \ | ||
# && rm -rf /var/lib/apt/lists/* /var/cache/apt/* | ||
|
||
#================================= | ||
# Chromium Launch Script Wrapper | ||
#================================= | ||
COPY wrap_chromium_binary /opt/bin/wrap_chromium_binary | ||
RUN /opt/bin/wrap_chromium_binary | ||
|
||
#============================================ | ||
# Chromium webdriver | ||
#============================================ | ||
RUN apt-get update -qqy \ | ||
&& apt-get -qqy install chromium-driver \ | ||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* | ||
|
||
|
||
USER 1200 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
VERSION=$1 | ||
NAMESPACE=$2 | ||
AUTHORS=$3 | ||
|
||
echo "# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" > ./Dockerfile | ||
echo "# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED." >> ./Dockerfile | ||
echo "# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE" >> ./Dockerfile | ||
echo "# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" >> ./Dockerfile | ||
echo FROM ${NAMESPACE}/node-base:${VERSION} >> ./Dockerfile | ||
echo LABEL authors="$AUTHORS" >> ./Dockerfile | ||
echo "" >> ./Dockerfile | ||
cat ./Dockerfile.txt >> ./Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
WRAPPER_PATH=$(readlink -f /usr/bin/chromium) | ||
BASE_PATH="$WRAPPER_PATH-base" | ||
mv "$WRAPPER_PATH" "$BASE_PATH" | ||
|
||
cat > "$WRAPPER_PATH" <<_EOF | ||
#!/bin/bash | ||
# Note: exec -a below is a bashism. | ||
exec -a "\$0" "$BASE_PATH" --no-sandbox "\$@" | ||
_EOF | ||
chmod +x "$WRAPPER_PATH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED. | ||
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE | ||
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
FROM local-seleniarm/node-chromium:4.0.0-20211110 | ||
LABEL authors=SeleniumHQ,sj26,jamesmortensen | ||
|
||
USER 1200 | ||
|
||
#==================================== | ||
# Scripts to run Selenium Standalone | ||
#==================================== | ||
COPY start-selenium-standalone.sh /opt/bin/start-selenium-standalone.sh | ||
|
||
#============================== | ||
# Supervisor configuration file | ||
#============================== | ||
COPY selenium.conf /etc/supervisor/conf.d/ | ||
|
||
# Copying configuration script generator | ||
COPY generate_config /opt/bin/generate_config | ||
|
||
# Boolean value, maps "--relax-checks" | ||
ENV SE_RELAX_CHECKS true | ||
|
||
EXPOSE 4444 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
BUILD_DATE=$(date +'%Y%m%d') | ||
VERSION=4.0.0-beta-2 | ||
CHROMIUM=91.0.4472.124 | ||
NAMESPACE=local-selenium | ||
AUTHORS=james | ||
|
||
cd ./Base && docker buildx build --platform linux/amd64 -t $NAMESPACE/base:$VERSION-$BUILD_DATE . | ||
echo $PWD | ||
cd ../Hub && sh generate.sh $VERSION-$BUILD_DATE $NAMESPACE $AUTHORS \ | ||
&& docker buildx build --platform linux/amd64 -t $NAMESPACE/hub:$VERSION-$BUILD_DATE . | ||
|
||
cd ../NodeBase && sh generate.sh $VERSION-$BUILD_DATE $NAMESPACE $AUTHORS \ | ||
&& docker buildx build --platform linux/amd64 -t $NAMESPACE/node-base:$VERSION-$BUILD_DATE . | ||
# && sed 's/chromium=.*/chromium=91.0.4472.124/' Dockerfile > Dockerfile \ | ||
cd ../NodeChromium && sh generate.sh $VERSION-$BUILD_DATE $NAMESPACE $AUTHORS \ | ||
&& docker buildx build --platform linux/amd64 -t $NAMESPACE/node-chromium:$VERSION-$BUILD_DATE . | ||
|
||
cd ../Standalone && sh generate.sh StandaloneChromium node-chromium $VERSION-$BUILD_DATE $NAMESPACE $AUTHORS \ | ||
&& cd ../StandaloneChromium \ | ||
&& docker buildx build --platform linux/amd64 -t $NAMESPACE/standalone-chromium:$VERSION-$BUILD_DATE . | ||
|
||
echo "Build node-hub, node-chromium, and standalone-chromium...\n" | ||
echo "Tagging builds...\n" | ||
|
||
docker tag $NAMESPACE/base:$VERSION-$BUILD_DATE $NAMESPACE/base:latest | ||
docker tag $NAMESPACE/hub:$VERSION-$BUILD_DATE $NAMESPACE/hub:latest | ||
docker tag $NAMESPACE/node-base:$VERSION-$BUILD_DATE $NAMESPACE/node-base:latest | ||
docker tag $NAMESPACE/node-chromium:$VERSION-$BUILD_DATE $NAMESPACE/node-chromium:latest | ||
docker tag $NAMESPACE/standalone-chromium:$VERSION-$BUILD_DATE $NAMESPACE/standalone-chromium:latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
BUILD_DATE=$(date +'%Y%m%d') | ||
VERSION=4.0.0 | ||
CHROMIUM=93.0.4577.82 # Not yet used at this time. Edit in NodeChromium/Dockerfile.txt | ||
NAMESPACE=local-seleniarm | ||
AUTHORS=SeleniumHQ,sj26,jamesmortensen | ||
|
||
cd ./Base && docker buildx build --platform linux/arm64 -t $NAMESPACE/base:$VERSION-$BUILD_DATE . | ||
echo $PWD | ||
cd ../Hub && sh generate.sh $VERSION-$BUILD_DATE $NAMESPACE $AUTHORS \ | ||
&& docker buildx build --platform linux/arm64 -t $NAMESPACE/hub:$VERSION-$BUILD_DATE . | ||
|
||
cd ../NodeBase && sh generate.sh $VERSION-$BUILD_DATE $NAMESPACE $AUTHORS \ | ||
&& docker buildx build --platform linux/arm64 -t $NAMESPACE/node-base:$VERSION-$BUILD_DATE . | ||
# && sed 's/chromium=.*/chromium=91.0.4472.124/' Dockerfile > Dockerfile \ | ||
cd ../NodeChromium && sh generate.sh $VERSION-$BUILD_DATE $NAMESPACE $AUTHORS \ | ||
&& docker buildx build --platform linux/arm64 -t $NAMESPACE/node-chromium:$VERSION-$BUILD_DATE . | ||
|
||
cd ../Standalone && sh generate.sh StandaloneChromium node-chromium $VERSION-$BUILD_DATE $NAMESPACE $AUTHORS \ | ||
&& cd ../StandaloneChromium \ | ||
&& docker buildx build --platform linux/arm64 -t $NAMESPACE/standalone-chromium:$VERSION-$BUILD_DATE . | ||
|
||
echo "Build node-hub, node-chromium, and standalone-chromium...\n" | ||
echo "Tagging builds...\n" | ||
|
||
docker tag $NAMESPACE/base:$VERSION-$BUILD_DATE $NAMESPACE/base:latest | ||
docker tag $NAMESPACE/hub:$VERSION-$BUILD_DATE $NAMESPACE/hub:latest | ||
docker tag $NAMESPACE/node-base:$VERSION-$BUILD_DATE $NAMESPACE/node-base:latest | ||
docker tag $NAMESPACE/node-chromium:$VERSION-$BUILD_DATE $NAMESPACE/node-chromium:latest | ||
docker tag $NAMESPACE/standalone-chromium:$VERSION-$BUILD_DATE $NAMESPACE/standalone-chromium:latest | ||
|