Skip to content

Commit 28e6006

Browse files
committed
fix(selenium): pin chrome and chromedriver versions
1 parent d0fae06 commit 28e6006

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

selenium-chrome/Dockerfile

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
1-
FROM python:3.12.4-slim
1+
FROM python:3.12-slim-bookworm
22

3+
# Install dependencies
34
RUN apt-get update && \
4-
apt-get install -y wget chromium chromium-driver && \
5-
pip install selenium==4.22.0 pytest==8.2.2 requests==2.32.3 && \
5+
apt-get install -y wget unzip gnupg curl && \
6+
# Download and install specific Chrome version
7+
wget -q https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_133.0.6943.141-1_amd64.deb && \
8+
apt-get install -y ./google-chrome-stable_133.0.6943.141-1_amd64.deb && \
9+
rm google-chrome-stable_133.0.6943.141-1_amd64.deb && \
10+
# Download and install the matching ChromeDriver version
11+
wget -q -O /tmp/chromedriver.zip https://storage.googleapis.com/chrome-for-testing-public/133.0.6943.141/linux64/chromedriver-linux64.zip && \
12+
unzip /tmp/chromedriver.zip -d /tmp && \
13+
mv /tmp/chromedriver-linux64/chromedriver /usr/bin/chromedriver && \
14+
chmod +x /usr/bin/chromedriver && \
15+
# Install Python packages
16+
pip install selenium==4.28.0 pytest==8.3.5 requests==2.32.3 && \
17+
# Clean up
18+
apt-get clean && \
619
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
720

821
WORKDIR /app

selenium-chrome/vsn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.1
1+
1.0.2

0 commit comments

Comments
 (0)