mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2026-01-11 21:10:25 +01:00
reach the localhost from inside docker-osx #306
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alexerisov on GitHub (Jan 17, 2022).
I wanna open localhost webserver in safari inside docker-osx. How can i do that?
@sickcodes commented on GitHub (Jan 18, 2022):
Local webhost webserver example for safari inside Docker-OSX right here :)
https://github.com/sickcodes/Docker-OSX#forward-additional-ports-nginx-hosting-example
@alexerisov commented on GitHub (Jan 18, 2022):
Yes, I've seen it, but this example describes how to start nginx in docker-osx and get it from localhost. But I wanna to start server on Local host and get it from inside docker-osx. I got problem that server and docker-osx require the same port on host machine. If I started server on 10024, Docker cannot start with same port. And if docker starts first, then server can't start.
@sickcodes commented on GitHub (Jan 20, 2022):
From inside the mac, you can reach 192.168.1.x naturally.
On host:
nginxwill start on 80ip addrwill show all your IP's and bridges, which are localhost.For me, I can visit the host on any of:
172.17.0.1
172.16.32.1
192.168.63.1
192.168.122.1
192.168.1.4
@alexerisov commented on GitHub (Jan 20, 2022):
Yep, It works. Thanks, you. I had tried 127.0.0.1:3000 and localhost:3000, and it had not worked. But as you advice 172.17.. and 192.168 works now. Thanks again )