jest-puppeteer-docker
jest-puppeteer-docker copied to clipboard
Running docker-compose with network_mode: "host"?
I am having trouble getting jest-puppeteer-docker to connect to an https site I have deployed locally with a predefined /etc/hosts entry.
The /etc/hosts
entry on my host machine is 127.0.0.1 local.my-domain.com
, therefore the site is accessible at https://local.my-domain.com. I cannot simply use the suggested host.docker.internal
because my site will not work properly with it.
One of the solutions would be to set network_mode: "host" in the docker-chromium > docker-compose.yml. However, once I set this, jest-puppeteer-docker gives up after 5 failed attempts to connect to Chrome within the docker container.
Any suggestions on how to properly do this? Thanks!