Reputation: 143
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:
SPLASH_URL
on my settings.py
according to my Docker IP adress;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.
Upvotes: 2
Views: 1591
Reputation: 1
Old topic but it has been helpfull for me. I add another way to get the IP address, without docker-machine.
With the container ID you can get the IP address with:
sudo docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' CONTAINER ID
To get the container ID use : sudo docker ps
You can also use the container name instead of the ID
Upvotes: 0
Reputation: 446
You don't need to change any settings.
If you launch docker terminal, it shows the correct ip address at the very first, right after the whale drawing.
## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/
docker is configured to use the default machine with IP 192.168.99.102
For help getting started, check out the docs at https://docs.docker.com
So in my case the ip was 192.168.99.102.
If I visit 192.168.99.102:8050 on chrome, splash works.
Upvotes: 3
Reputation: 143
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!
Upvotes: 4