Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions Base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ LABEL org.opencontainers.image.source="https://github.com/${AUTHORS}/docker-sele
# Arguments to define the version of dependencies to download
ARG VERSION
ARG RELEASE=selenium-${VERSION}
ARG MVN_SELENIUM_VERSION
# Default value should be aligned with upstream Selenium (https://github.com/SeleniumHQ/selenium/blob/trunk/MODULE.bazel)
ARG OPENTELEMETRY_VERSION=1.51.0
ARG GRPC_VERSION=1.73.0
ARG NETTY_VERSION=4.1.122.Final
ARG CS_VERSION=2.1.24
ARG POSTGRESQL_VERSION=42.7.7
ARG ENVSUBST_VERSION=1.4.5

#Arguments to define the user running Selenium
Expand Down Expand Up @@ -148,14 +146,7 @@ RUN --mount=type=secret,id=SEL_PASSWD \
io.netty:netty-handler:${NETTY_VERSION} \
io.netty:netty-common:${NETTY_VERSION} \
> /external_jars/.classpath.txt \
&& chmod 664 /external_jars/.classpath.txt \
&& java -jar /tmp/cs fetch --classpath --cache /external_jars \
org.seleniumhq.selenium:selenium-session-map-jdbc:${MVN_SELENIUM_VERSION} \
org.postgresql:postgresql:${POSTGRESQL_VERSION} \
org.seleniumhq.selenium:selenium-session-map-redis:${MVN_SELENIUM_VERSION} \
# Patch specific version for CVEs in the dependencies
> /external_jars/.classpath_session_map.txt \
&& chmod 664 /external_jars/.classpath_session_map.txt ; \
&& chmod 664 /external_jars/.classpath.txt ; \
fi \
&& rm -fr /root/.cache/* \
# (Note that .bashrc is only executed in interactive bash shells.)
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ gen_certs:

base: prepare_resources gen_certs
cd ./Base && SEL_PASSWD=$(SEL_PASSWD) docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) --build-arg VERSION=$(BASE_VERSION) --build-arg RELEASE=$(BASE_RELEASE) --build-arg AUTHORS=$(AUTHORS) \
--build-arg MVN_SELENIUM_VERSION=$(MVN_SELENIUM_VERSION) --secret id=SEL_PASSWD --sbom=true --attest type=provenance,mode=max -t $(NAME)/base:$(TAG_VERSION) .
--secret id=SEL_PASSWD --sbom=true --attest type=provenance,mode=max -t $(NAME)/base:$(TAG_VERSION) .

base_nightly:
BASE_VERSION=$(BASE_VERSION_NIGHTLY) BASE_RELEASE=$(BASE_RELEASE_NIGHTLY) make base
Expand All @@ -146,7 +146,8 @@ router: base
cd ./Router && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/router:$(TAG_VERSION) .

sessions: base
cd ./Sessions && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/sessions:$(TAG_VERSION) .
cd ./Sessions && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) $(FROM_IMAGE_ARGS) \
--build-arg MVN_SELENIUM_VERSION=$(MVN_SELENIUM_VERSION) -t $(NAME)/sessions:$(TAG_VERSION) .

sessionqueue: base
cd ./SessionQueue && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/session-queue:$(TAG_VERSION) .
Expand Down
13 changes: 13 additions & 0 deletions Sessions/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,26 @@ ARG VERSION=latest
FROM ${NAMESPACE}/base:${VERSION}
ARG AUTHORS
LABEL authors=${AUTHORS}
ARG MVN_SELENIUM_VERSION
ARG POSTGRESQL_VERSION=42.7.7

#========================
# Selenium SessionMap Configuration
#========================

USER root

RUN if [ -f "/tmp/cs" ]; then \
java -jar /tmp/cs fetch --classpath --cache /external_jars \
org.seleniumhq.selenium:selenium-session-map-jdbc:${MVN_SELENIUM_VERSION} \
org.postgresql:postgresql:${POSTGRESQL_VERSION} \
org.seleniumhq.selenium:selenium-session-map-redis:${MVN_SELENIUM_VERSION} \
# Patch specific version for CVEs in the dependencies
> /external_jars/.classpath_session_map.txt \
&& chmod 664 /external_jars/.classpath_session_map.txt ; \
fi \
&& rm -fr /root/.cache/*

COPY --chown="${SEL_UID}:${SEL_GID}" start-selenium-grid-sessions.sh generate_config \
/opt/bin/
RUN chmod +x /opt/bin/start-selenium-grid-sessions.sh /opt/bin/generate_config
Expand Down
Loading