Skip to content

Commit 80d2780

Browse files
committed
Update README - networking fix maxpou#24
1 parent 973a829 commit 80d2780

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@ Docker-symfony gives you everything you need for developing Symfony application.
2525
3. Update your system host file (add symfony.dev)
2626

2727
```bash
28-
# get containers IP address and update host (replace IP according to your configuration)
29-
$ docker inspect --format '{{ .NetworkSettings.Networks.dockersymfony_default.IPAddress }}' $(docker ps -f name=nginx -q)
28+
# UNIX only: get containers IP address and update host (replace IP according to your configuration)
29+
$ docker network inspect bridge | grep Gateway
30+
3031
# unix only (on Windows, edit C:\Windows\System32\drivers\etc\hosts)
3132
$ sudo echo "171.17.0.1 symfony.dev" >> /etc/hosts
3233
```
3334

34-
**Note:** If it's empty, run `docker inspect $(docker ps -f name=nginx -q) | grep IPAddress` instead.
35+
**Note:** For **OS X**, please take a look [here](https://docs.docker.com/docker-for-mac/networking/) and for **Windows** read [this](https://docs.docker.com/docker-for-windows/#/step-4-explore-the-application-and-run-examples) (4th step).
3536

3637
4. Prepare Symfony app
3738
1. Update app/config/parameters.yml
@@ -109,6 +110,10 @@ $ docker-compose exec php php /var/www/symfony/bin/console cache:clear # Symfony
109110
$ docker-compose exec php bash
110111
$ sf cache:clear
111112
113+
# Retrieve an IP Address (here for the nginx container)
114+
$ docker inspect --format '{{ .NetworkSettings.Networks.dockersymfony_default.IPAddress }}' $(docker ps -f name=nginx -q)
115+
$ docker inspect $(docker ps -f name=nginx -q) | grep IPAddress
116+
112117
# MySQL commands
113118
$ docker-compose exec db mysql -uroot -p"root"
114119

0 commit comments

Comments
 (0)