scrapinghub / splash

Lightweight, scriptable browser as a service with an HTTP API
BSD 3-Clause "New" or "Revised" License
4.09k stars 513 forks source link

Running multiples instances on multiple ports #1012

Closed mwbelt closed 4 years ago

mwbelt commented 4 years ago

I'm trying to run multiple instances on multiple ports, with no success.

docker run -p 8050:8050 scrapinghub/splash docker run -p 8055:8055 scrapinghub/splash

Both of these start successfully, but both claim to be listening on port 8050, no matter what I pass with the -p option.

What am I doing wrong?

Gallaecio commented 4 years ago

Internally, the port is always 8050 (not sure if it can be configured otherwise).

So the second Docker command must map 8050 to 8055, not 8055 to 8055. I don’t remember if the right syntax is -p 8055:8050 or -p 8050:8055, but one of those should work.

mwbelt commented 4 years ago

@Gallaecio Thank you so much. I just found that and came back to close my ticket.

Thanks for answering such a noob question.

deeprony7 commented 4 years ago

-p 8055:8050

For clarity, port mapping is in the format - host:container docker run -p 8055:8050 scrapinghub/splash