andyearnshaw / docketeer

A tiny application that lets you use a dockerised browser for Puppeteer
The Unlicense
3 stars 1 forks source link

Abolish `--bind-port` in favour of parsing `--remote-debugging-port` from the supplied arguments #2

Closed andyearnshaw closed 2 years ago

andyearnshaw commented 2 years ago

Specifying --bind-port should not be necessary, we can parse any port to expose from the flags supplied to the browser. For instance, if Puppeteer passes --remote-debugging-port=9000, then we know to expose port 9000 in the docker run command.

If Puppeteer passes --remote-debugging-port=0, we need to change it to a random available port number on its way to Chromium. If --remote-debugging-pipe is passed, then we don't need to expose any ports.