Giter Club home page Giter Club logo

Comments (8)

chrbala avatar chrbala commented on July 30, 2024

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.

justinribeiro avatar justinribeiro commented on July 30, 2024

The chrome-headless containers have CMD and ENTRYPOINT, which will allow you to add arbitrary arguments without custom builds:

image

from dockerfiles.

gogo9th avatar gogo9th commented on July 30, 2024

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.

gogo9th avatar gogo9th commented on July 30, 2024

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.

justinribeiro avatar justinribeiro commented on July 30, 2024

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:

image

from dockerfiles.

gogo9th avatar gogo9th commented on July 30, 2024

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.

justinribeiro avatar justinribeiro commented on July 30, 2024

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.

gogo9th avatar gogo9th commented on July 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.