sail icon indicating copy to clipboard operation
sail copied to clipboard

How to publish port on host

Open ceo0x opened this issue 6 years ago • 2 comments

Hello community , how do i open a port for lets say the web app that im developing inside sail ??

lets say i run it using "npm run serve" and i want to access localhost:8000 to see the web being served

how to access this from my browser?

ceo0x avatar Aug 31 '19 05:08 ceo0x

Is there any way to use these params on sail? image

ceo0x avatar Sep 02 '19 18:09 ceo0x

To keep workflow as close to local development as possible, sail uses docker host networking when possible. That means if your webserver within Sail binds to :8080, it will be accessible from 127.0.0.1:8080 in your browser.

Docker for Mac doesn’t support host networking, so this won’t work when running Sail on a Mac host. A workaround is planned for a future release of Sail.

https://sail.dev/docs/concepts/docker/

gilsdav avatar Sep 04 '19 19:09 gilsdav