pythondockerhostnamescrapy-splash

Scrapy-splash no results at "Server listening on http://0.0.0.0:8050"


I'm on Windows 10 Home Edition using Docker tool box (my BIOS configuration doesn't allow me to install Linux)

When I run

docker run -it -p 8050:8050 --rm scrapinghub/splash

I receive the log message Server listening on http://0.0.0.0:8050, as it should be in normal cases. But when I go to the address at my Chrome, the only thing that returns is ERR_ADDRESS_INVALID, not possible to access the page.


I have tried the following solutions to this problem:

  1. Changing the SPLASH_URL on my settings.py according to my Docker IP adress;
  2. Adding new ports to my docker run, such as 5023:5023 and 8051:8051.

I imagine that this is the kind of problem which I need to investigate its caused by myself. But I have tried everything that I could find on the Internet.


Solution

  • I'm gonna write the right answer, thanks to the users Selcuk, for explaning some technical terms, and David Maze, for giving me the final solution.


    Since we are using the Docker Toolbox, we need to use our docker-machine ip. Go to your terminal and type:

    docker-machine ip
    

    Now that you have the right ip, go to your settings.py and set

    SPLASH_URL = http://[docker-machine ip]:8050
    

    And you're good to go!