DEV Community

Discussion on: Setup a basic Local PHP Development Environment in Docker

Collapse
 
czuidema profile image
chriszui • Edited

For macOS users that cannot connect to the localhost:
The docker containers do not run on the host machine itself but in a VM.
I used the following workaround:
1.) Find the IP with the command 'docker-machine ip default' in the terminal.
2.) The command returns something like '192.168.99.100'.
3.) Use this IP instead of 'localhost'. Access the port 80 by typing '192.168.99.100:80' into the browser. Or '192.168.99.100:8080' for the port 8080.