-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update: Java 17 and maven deps same as upstream Selenium
Signed-off-by: Viet Nguyen Duc <[email protected]>
- Loading branch information
Showing
1 changed file
with
23 additions
and
6 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,12 +1,12 @@ | ||
FROM ubuntu:jammy-20240227 | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
FROM ubuntu:jammy | ||
LABEL authors="Selenium <[email protected]>" | ||
|
||
# Arguments to define the version of dependencies to download | ||
ARG VERSION | ||
ARG RELEASE=selenium-${VERSION} | ||
# Default value should be aligned with upstream Selenium (https://github.com/SeleniumHQ/selenium/blob/trunk/java/maven_deps.bzl) | ||
ARG OPENTELEMETRY_VERSION=1.34.1 | ||
ARG GRPC_VERSION=1.61.0 | ||
ARG OPENTELEMETRY_VERSION=1.35.0 | ||
ARG GRPC_VERSION=1.61.1 | ||
|
||
#Arguments to define the user running Selenium | ||
ARG SEL_USER=seluser | ||
|
@@ -22,6 +22,8 @@ USER root | |
RUN echo "deb http://archive.ubuntu.com/ubuntu jammy main universe\n" > /etc/apt/sources.list \ | ||
&& echo "deb http://archive.ubuntu.com/ubuntu jammy-updates main universe\n" >> /etc/apt/sources.list \ | ||
&& echo "deb http://security.ubuntu.com/ubuntu jammy-security main universe\n" >> /etc/apt/sources.list | ||
ARG TARGETARCH=amd64 | ||
ARG TARGETVARIANT | ||
|
||
# No interactive frontend during docker build | ||
ENV DEBIAN_FRONTEND=noninteractive \ | ||
|
@@ -31,13 +33,13 @@ ENV DEBIAN_FRONTEND=noninteractive \ | |
# Miscellaneous packages | ||
# Includes minimal runtime used for executing non GUI Java programs | ||
#======================== | ||
ARG JRE_VERSION=17 | ||
RUN apt-get -qqy update \ | ||
&& apt-get upgrade -yq \ | ||
&& apt-get -qqy --no-install-recommends install \ | ||
acl \ | ||
bzip2 \ | ||
ca-certificates \ | ||
openjdk-11-jre-headless \ | ||
tzdata \ | ||
sudo \ | ||
unzip \ | ||
|
@@ -47,8 +49,23 @@ RUN apt-get -qqy update \ | |
supervisor \ | ||
gnupg2 \ | ||
libnss3-tools \ | ||
&& 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 | ||
&& mkdir -p /etc/apt/keyrings \ | ||
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 843C48A565F8F04B \ | ||
&& wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | tee /etc/apt/keyrings/adoptium.asc >dev/null \ | ||
&& echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list >dev/null \ | ||
&& apt-get -qqy update \ | ||
&& apt-get -qqy --no-install-recommends install temurin-${JRE_VERSION}-jre -y \ | ||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* | ||
|
||
#=================== | ||
|
||
RUN if [ $TARGETARCH = "arm" ] && [ $TARGETVARIANT = "v7" ]; then \ | ||
export ARCH=armhf ; \ | ||
else \ | ||
export ARCH=$TARGETARCH ; \ | ||
fi \ | ||
&& sed -i 's/securerandom\.source=file:\/dev\/random/securerandom\.source=file:\/dev\/urandom/' ./usr/lib/jvm/temurin-${JRE_VERSION}-jre-$ARCH/conf/security/java.security | ||
|
||
|
||
#=================== | ||
# Timezone settings | ||
|
2 comments
on commit 71266a4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@diemol, with the upgrade JRE 17 used in base image, do you think it is fine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Java 17 is recommended for development, the minimum Java version is 11.
Having Java 17 in the images is fine.
Shouldn't we use a tag to know what base image we rely on? I guess renovate can help us keep this updated.