chrome-headless-trunk | date Headless Chromium right off the trunk | Continuous Deployment library
kandi X-RAY | chrome-headless-trunk Summary
kandi X-RAY | chrome-headless-trunk Summary
Always up-to-date Headless Chromium right off the trunk in a Docker image
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of chrome-headless-trunk
chrome-headless-trunk Key Features
chrome-headless-trunk Examples and Code Snippets
Community Discussions
Trending Discussions on chrome-headless-trunk
QUESTION
Trying to run chrome headless as a container (Image: https://hub.docker.com/r/alpeware/chrome-headless-trunk) in my docker-compose and connecting to it from another container.
ProblemTo actually connect to chrome inside the container, I first need to retrieve the webSocketDebuggerUrl, which is available at http://0.0.0.0:9222/json/version of the chrome-headless.
The Problem is: my request to this path always fails with
RequestError: Error: connect ECONNREFUSED 0.0.0.0:9222
and cant get the webSocketDebuggerUrl to connect to chrome.
Some more InfoAlso if I visit http://0.0.0.0:9222/json/version in my browser myself, copy the url and hardcode it into my puppeteer.connect(), it ONLY works as expected, if I replace the address of '0.0.0.0' to my (linked) container-name (specified in docker-compose): http://chrome:9222/json/version
If I try to request the webSocketDebuggerUrl from /json/version while using container-name address (http://chrome:9222/json/version) i get the error
My Code (abstraction) ...StatusCodeError: 500 - "Host header is specified and is not an IP address or localhost."
ANSWER
Answered 2018-Dec-20 at 11:56Well, since the errorMessage from the 500 said "host is specified", ist just set that header to empty, and now I can successfully request the webSocketDebuggerUrl.
The solution feels a bit hacky, so if anyone has a suggestion on how to improve it I'd be happy:
QUESTION
I am unsure if this is even a good practice, but I am wanting to specify a number of docker images to launch. Ideally it would auto-increment the port and tmp data location.
Here is my current command:
sudo docker run -it -d --restart=always -p=0.0.0.0:9220:9222 -m 1G -v /tmp/chromedata/:/data alpeware/chrome-headless-trunk
Ideally I'd want to be able to spawn, say 5 of these - auto incrementing such as this:
...ANSWER
Answered 2017-Oct-18 at 18:26One way is to create a little bash script do increment the port number, e.g.
QUESTION
I was trying to figure out how to run headless Chrome in a docker container. Then I have found this. But now I can't figure out how to run my tests in that container.
Can someone give me some a general direction where should I dig, I tried looking through Pupeeteer's docs, yet couldn't find anything. Maybe there's a minimal example in the wild, where I can maybe use Karma or whatever to run tests in a container and log results.
Note though that I would like to compile/bundle javascript outside of the container, and use it just to execute compiled/bundled tests in it.
Maybe later I would like to use the same approach to also run my acceptance tests, but this time by running a web-server outside, possibly in a separate container.
My end goal is to be able to run bunch of test written in Clojurescript, I don't think though anybody has done something like that yet. Maybe somebody has.
...ANSWER
Answered 2017-Aug-29 at 06:19I think I have sketched out a game plan:
first, need to run the container:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install chrome-headless-trunk
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page