File tree Expand file tree Collapse file tree 1 file changed +12
-20
lines changed
Expand file tree Collapse file tree 1 file changed +12
-20
lines changed Original file line number Diff line number Diff line change 22FROM ghcr.io/astral-sh/uv:python3.11-bookworm
33
44# Install Chrome and dependencies
5- RUN apt-get update && apt-get install -y \
6- wget \
7- gnupg \
8- curl \
9- unzip \
10- && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
11- && echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \
12- && apt-get update \
13- && apt-get install -y \
14- google-chrome-stable \
15- && rm -rf /var/lib/apt/lists/*
16-
17- # Install ChromeDriver
18- RUN CHROME_VERSION=$(google-chrome --version | awk '{print $3}' | awk -F'.' '{print $1}' ) \
19- && CHROMEDRIVER_VERSION=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION" ) \
20- && wget -q "https://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip" \
21- && unzip chromedriver_linux64.zip \
22- && mv chromedriver /usr/local/bin/ \
23- && chmod +x /usr/local/bin/chromedriver \
24- && rm chromedriver_linux64.zip
5+ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
6+ RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
7+ RUN apt-get -y update
8+ RUN apt-get install -y google-chrome-stable
9+
10+ # install chromedriver
11+ RUN apt-get install -yqq unzip
12+ RUN wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip
13+ RUN unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/
14+
15+ # set display port to avoid crash
16+ ENV DISPLAY=:99
2517
2618# Create a non-root user
2719RUN useradd -m -u 1000 appuser
You can’t perform that action at this time.
0 commit comments