@@ -13,7 +13,7 @@ ARG NETTY_VERSION=4.2.7.Final
1313ARG CS_VERSION=2.1.25-M18
1414ARG ENVSUBST_VERSION=1.4.7
1515ARG CURL_VERSION=8.16.0
16- ARG PYTHON_VERSION=3.13
16+ ARG PYTHON_VERSION=3.14
1717
1818# Arguments to define the user running Selenium
1919ARG SEL_USER=seluser
@@ -40,7 +40,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
4040 VIDEO_FOLDER="/videos" \
4141 # Path to the Configfile
4242 CONFIG_FILE="/opt/selenium/config.toml" \
43- VENV_PATH=/opt /venv
43+ VENV_PATH=${HOME} /venv
4444
4545# ========================
4646# Miscellaneous packages
@@ -95,12 +95,9 @@ RUN gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys F23C5A6CF475977595
9595 && apt-get -qqy update \
9696 && apt-get upgrade -yq \
9797 && apt-get -qqy --no-install-recommends install python${PYTHON_VERSION} python${PYTHON_VERSION}-venv \
98- && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1 \
99- && update-alternatives --install /usr/bin/python python /usr/bin/python${PYTHON_VERSION} 1 \
100- && python3 -m ensurepip --upgrade \
101- && python3 -m pip install --upgrade pip virtualenv --break-system-packages \
102- && rm -rf /var/lib/apt/lists/* /var/cache/apt/* \
103- && echo "source $VENV_PATH/bin/activate" >> /etc/bash.bashrc
98+ && dpkg-divert --add --rename --divert /usr/bin/python3.distrib /usr/bin/python3 \
99+ && ln -sf /usr/bin/python${PYTHON_VERSION} /usr/bin/python3 \
100+ && rm -rf /var/lib/apt/lists/* /var/cache/apt/*
104101
105102RUN ARCH=$(if [ "$(dpkg --print-architecture)" = "arm64" ]; then echo "aarch64" ; else echo "$(dpkg --print-architecture)" ; fi) \
106103 && wget -q https://github.com/NDViet/static-curl/releases/download/${CURL_VERSION}/curl-$ARCH -O /usr/bin/curl \
@@ -196,12 +193,14 @@ RUN ARCH=$(if [ "$(dpkg --print-architecture)" = "amd64" ]; then echo "x86_64";
196193USER ${SEL_UID}:${SEL_GID}
197194
198195RUN python3 -m venv $VENV_PATH \
199- && $VENV_PATH/bin/python3 -m pip install --upgrade pip setuptools psutil requests \
196+ && $VENV_PATH/bin/python3 -m pip install --upgrade pip psutil requests \
200197 && wget -q https://github.com/Supervisor/supervisor/archive/refs/heads/main.zip -O /tmp/supervisor.zip \
201198 && unzip /tmp/supervisor.zip -d /tmp \
202199 && cd /tmp/supervisor-main \
203- && $VENV_PATH/bin/python3 -m pip install --break-system-packages . \
204- && rm -rf /tmp/supervisor.zip /tmp/supervisor-main
200+ && $VENV_PATH/bin/python3 -m pip install . \
201+ && rm -rf /tmp/supervisor.zip /tmp/supervisor-main \
202+ && python3 --version \
203+ && echo "source $VENV_PATH/bin/activate" >> ${HOME}/.bashrc
205204
206205# RUN /opt/bin/add-jks-helper.sh -d /opt/selenium/secrets \
207206# && /opt/bin/add-cert-helper.sh -d /opt/selenium/secrets ${CERT_TRUST_ATTR}
0 commit comments