chrome-in-docker icon indicating copy to clipboard operation
chrome-in-docker copied to clipboard

Launching Chrome during build

Open nishmeht7 opened this issue 7 years ago • 2 comments

Hi, thanks for this repo.

I've been struggling to find an example of a unique use case that I have. I'd like to download and launch chrome during my build process. I don't really care about the image created, all I care about is launching chrome during the build process and performing some e2e tests with my project. As long as they are successful and a build is created for my project (i.e. an image has been successfully created) - that's all I need to know.

Given this use case and the dockerfile in this project, is it even possible to launch chrome during the build process itself? If so, how would I do that?

  • Also sorry this is not really an issue with your project. But this is the closest solution I have found atm and was wondering if you were able to provide any advice given my situation. Thank you!

nishmeht7 avatar Jul 03 '18 16:07 nishmeht7

I think your case just need to launch a prebuilt chrome image to run some testing, use volume mounting your code space, and run your override cmd ; don't even need to build it, but you can build once only and save to somewhere either your DockerHub account or your internal on-premises docker registry, and re-use it at least 2 months still the latest ; or if you don't if it's latest or not, you can re-use for longer time

this repo is kept for you be able build a latest chrome version (the Version 66 or so), either the stable, the beta, or the bleeding edge #dev channel,

last year I do have the prebuilt image but Chrome is updating almost every 2 months I was tried to push upgrade that, https://hub.docker.com/r/c0b0/chrome-stable/

c0b avatar Jul 03 '18 17:07 c0b

Thanks for the quick reply.

I'm quite new to docker and am still wrapping my head around it. So in your proposed solution, could I use https://hub.docker.com/r/c0b0/chrome-stable/ as the base image? If I do that, how do I run and execute headless chrome during the build itself? What would the Dockerfile look like?

    FROM c0b0/chrome-stable
    RUN ... ?

nishmeht7 avatar Jul 03 '18 17:07 nishmeht7