chore: updated deps

This commit is contained in:
Marvin Zhang
2024-11-22 17:55:20 +08:00
parent 9560da66b5
commit 2b3473dc48
8 changed files with 17 additions and 15 deletions

View File

@@ -6,7 +6,7 @@ RUN bash /app/install/deps/deps.sh && \
bash /app/install/python/python.sh && \
bash /app/install/go/go.sh && \
bash /app/install/node/node.sh && \
bash /app/install/chromedriver/chromedriver.sh
bash /app/install/browser/browser.sh
# Final stage
FROM ubuntu:22.04

View File

@@ -21,17 +21,14 @@ apt-get install -y \
npm install -g @puppeteer/browsers
# Install chrome with auto-yes
npx -y @puppeteer/browsers install chrome@${version}
npx -y @puppeteer/browsers install chrome@${version} \
--install-deps \
--path=/chrome
# Add Chrome to PATH
CHROME_PATH="/chrome/linux-*/chrome-linux64"
if [ -d "$CHROME_PATH" ]; then
CHROME_BIN=$(find "$CHROME_PATH" -name "chrome")
if [ -n "$CHROME_BIN" ]; then
ln -sf "$CHROME_BIN" /usr/local/bin/google-chrome
chmod +x /usr/local/bin/google-chrome
fi
fi
CHROME_PATH="/chrome/linux-${version}/chrome-linux64"
CHROME_BIN="$CHROME_PATH/chrome"
ln -s "$CHROME_BIN" /usr/local/bin/google-chrome
# Verify chrome is installed (with more detailed error message)
if ! command -v google-chrome &> /dev/null; then