I have this docker-compose configuration in which I want to embed a chrome headless browser to run my e2e tests...
The nginx
is configured to reverse proxy a url, let's say foo.bar
to somewhere...
this works just fine if I use my host browser, and I can test it by exposing the 444:443
ports!
however, it doesn't work when I try to use the chrome-alpine
one,
I navigate to the debugger localhost:9222
, select the instance and then type: http://foo.bar
.
How can I configure alpine-chrome
to use the nginx container?
services:
nginx:
image: nginx:alpine
command: [nginx-debug, "-g", "daemon off;"]
volumes:
- ../../config/nginx/nginx.config.d:/etc/nginx/conf.d/server.conf
- ../../config/nginx/certs:/etc/nginx/certs
ports:
- "444:443"
chrome:
image: zenika/alpine-chrome:latest
command: [chromium-browser, "--headless", "--disable-gpu", "--no-sandbox", "--remote-debugging-address=0.0.0.0", "--remote-debugging-port=9222"]
ports:
- "9222:9222"
Expected
- Navigate to
localhost:9222
- Open the Chrome remote debugger
- type the url
foo.bar
- have nginx reverse proxy
foo.bar
to (e.g.)google.com