How to launch --headless on Docker or wercker?
See original GitHub issueHi. I want to run ChromeHeadless
on CI services.
I could not launch google-chrome --headless
because the following error:
Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
Is there some workarounds?
- CI conf script: https://github.com/Quramy/angular-karma-chrome-headless-demo/blob/master/wercker.yml#L28
- result of running on wercker CI: https://app.wercker.com/Quramy/angular-karma-chrome-headless-demo/runs/build/590c7c4da73a560001067c6e?step=590c7c514a016c0001f00fbe
I tried to run in local env(macOS Chrome canary), and it works well.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:7
Top Results From Across the Web
How to use Puppeteer inside a Docker container
The browser installation via apt will resolve the required dependencies to run a headless browser inside a Docker container without any manual ...
Read more >How to set up a Headless Chrome Node.js server in Docker
After running the Docker build, we get our Chromium executable: /usr/bin/chromium-browser . This should be our main Puppeteer Chrome executable ...
Read more >Running Headless Chrome with Puppeteer and Docker
In this post, I'd like to introduce my take on a quick dockerized Puppeteer development environment, to work with the Headless Chrome Node...
Read more >Configure Docker for Headless Browser setup in Linux
Step 2 in the Linux setup for the ServiceNow® Headless Browser for ATF: Configure Docker Server to authenticate all requests.
Read more >How to run google chrome headless in docker? - Stack Overflow
The command used in that container to launch headless chrome is this: ... docker run -it --rm -p=0.0.0.0:9222:9222 \ --name=chrome-headless ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There is no need to start a privileged container, turning off the chrome sandbox with
--no-sandbox
is enough. Added the following to mykarma.conf.js
:Hi,
I was getting this issue as well. For me adding the
--privileged
flag when runningdocker run
resolved the issue.The complete command I ran when starting the Docker container was:
docker run -it --privileged -v $(pwd):${MOUNT_POINT} ${DOCKER_IMAGE} bash
Hope that helps you too!