Dockerfile aktualisiert
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -31,11 +31,11 @@ RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add
|
||||
apt-get install -y google-chrome-stable --no-install-recommends && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 4. Passenden Chromedriver installieren (ROBUSTE, NEUE METHODE)
|
||||
# Dieser Block funktioniert mit den aktuellen Google-Download-Pfaden ("Chrome for Testing").
|
||||
RUN CHROME_VERSION=$(google-chrome --version | cut -f 3 -d ' ' | cut -d '.' -f 1-3) \
|
||||
&& DRIVER_VERSION=$(wget -qO- "https://googlechromelabs.github.io/chrome-for-testing/latest-patch-versions-per-build.json" | grep -A1 "\"${CHROME_VERSION}\"" | grep "version" | cut -d '"' -f 4) \
|
||||
&& wget -q "https://storage.googleapis.com/chrome-for-testing-public/${DRIVER_VERSION}/linux64/chromedriver-linux64.zip" -O /tmp/chromedriver.zip \
|
||||
# 4. Passenden Chromedriver installieren (NEUE, NOCH ROBUSTERE METHODE)
|
||||
# Dieser Block holt sich direkt die URL für den neuesten stabilen Chromedriver,
|
||||
# ohne auf einen Versionsabgleich angewiesen zu sein.
|
||||
RUN DRIVER_URL=$(wget -qO- "https://googlechromelabs.github.io/chrome-for-testing/latest-stable-versions.json" | grep -o '"linux64","url":"[^"]*' | grep 'chromedriver' | cut -d '"' -f 6) \
|
||||
&& wget -q "${DRIVER_URL}" -O /tmp/chromedriver.zip \
|
||||
&& unzip /tmp/chromedriver.zip -d /usr/local/bin/ \
|
||||
&& mv /usr/local/bin/chromedriver-linux64/chromedriver /usr/local/bin/ \
|
||||
&& rm -rf /tmp/chromedriver.zip /usr/local/bin/chromedriver-linux64 \
|
||||
|
||||
Reference in New Issue
Block a user