docs: accesing localhost on Windows and Linux

This commit is contained in:
soulgalore 2019-04-16 00:41:45 +02:00
parent e55768c351
commit 705c4e9324
1 changed files with 7 additions and 1 deletions

View File

@ -98,12 +98,18 @@ To change connectivity you should use Docker networks, read all about it [here](
## Access localhost
If you run a server local on your machine and want to access it with sitespeed.io you can do that on your Mac super easy if you are using Docker 18-3 or later by using _host.docker.internal_.
If you run a server local on your machine and want to access it with sitespeed.io you can do that on Mac and Windows super easy if you are using Docker 18-3 or later by using _host.docker.internal_.
```bash
docker run --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %} -b firefox http://host.docker.internal:4000/
```
If you are using Linux you should use `--network=host` to make sure localhost is your host machine.
```bash
docker run --rm -v "$(pwd)":/sitespeed.io --network=host sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %} -b firefox http://localhost:4000/
```
## Troubleshooting
If something doesn't work, it's hard to guess what't wrong. Then hook up x11vnc with xvfb so that you can see what happens on your screen.