Comments (8)
I've been building my own images with the arguments I need, but it would be great if these images supported arbitrary arguments!
from dockerfiles.
The chrome-headless containers have CMD and ENTRYPOINT, which will allow you to add arbitrary arguments without custom builds:
from dockerfiles.
Hi, thanks very much for your answer. I tried the following:
docker run -it -p 9222:9222 --cap-add=SYS_ADMIN justinribeiro/chrome-headless "--proxy-server=64.227.8.188:8181"
but I get the error:
(google-chrome:1): Gtk-WARNING **: 07:47:48.668: cannot open display:
Do you have any idea how I could fix it...?
from dockerfiles.
Actually, even if I run the following:
docker run -it -p 9222:9222 --cap-add=SYS_ADMIN justinribeiro/chrome-headless "--proxy-server=64.227.8.188:8181" "--headless"
the container exits immediately.
from dockerfiles.
I should have been more clear: the docker documentation explains the process fully Overriding Dockerfile image defaults.
As an example, here's the container running with the full set of flags required in a pure override:
from dockerfiles.
Thanks very much for your guide, now it works fine!
In fact, I have one last question. I wonder if you know how we can add trusted certificates. I don't see a command line option for adding a certificate:
For me, using a certificate is important rather than adding simply adding the "--ignore-certificate-errors --ignore-certificate-errors-spki-list" options, because otherwise Chrome doesn't cache fetched resources (as they are untrusted)...
from dockerfiles.
The container doesn't have a means to consume custom certificates; you'd have to build your own hook to import them into the trust. If you've generated a certificate for say a local server, you can use certutil to do this on linux with something along the lines of:
$ certutil -d sql:$HOME/.pki/nssdb -A -t \"P,,\" -n ./my-local-cert.pem -i ./my-local-cert.pem"
from dockerfiles.
I actually knew about this command, but never imagined using it inside a container to get around this issue. Thanks very much for your tip, again!
from dockerfiles.
Related Issues (20)
- Mismatch of Chrome versions in 'chrome-headless' container
- Cannot open display error HOT 5
- How are you controlling headless Chrome when it's running in a Docker? HOT 2
- Request: Ability to set uid/gid of chrome user HOT 1
- Allow to lock version for headless Chrome HOT 1
- chrome-headless: Fontconfig error HOT 1
- [chrome-headless] The SUID sandbox helper binary was found, but is not configured correctly HOT 4
- Trying to run lighthouse against a host that is in another container HOT 2
- can't get /json/version by hostname
- Lighthouse docker image fix HOT 1
- Lighthouse: No usable sandbox! HOT 1
- Getting "Runtime error encountered: No Chrome installations found." on running Lighthouse command HOT 3
- Unable to connect to Chrome - Gtk-WARNING **: 04:33:21.729: cannot open display HOT 4
- can I run lighthouse without mounting local filesystem HOT 5
- Getting permission denied error with lighthouse image HOT 4
- Update lighthouse HOT 1
- chrome report crash after run images
- justinribeiro/lighthouse timeout HOT 2
- Example does not work: ReferenceError
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dockerfiles.