我需要使用 Chrome 在 docker 内启动 Puppeteer headfull (headless false),但出现相同的错误:“无法启动 chrome”。
我安装了所有依赖项,但它随时都会崩溃
Error: Failed to launch chrome!
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/app/node_modules/puppeteer/lib/Launcher.js:339:14)
at ChildProcess.helper.addEventListener (/app/node_modules/puppeteer/lib/Launcher.js:329:60)
at emitTwo (events.js:131:20)
at ChildProcess.emit (events.js:214:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
Run Code Online (Sandbox Code Playgroud)
Dockerfile
FROM node:8
RUN apt-get update && apt-get install -yq --no-install-recommends tightvncserver xfce4 xfce4-goodies apt-utils gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates …Run Code Online (Sandbox Code Playgroud)