-
Notifications
You must be signed in to change notification settings - Fork 843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't bind ports with docker enabled on Mac OS X #2455
Comments
stack ghci
doesn't publish ports with docker enabledstack ghci
doesn't open ports with docker enabled
stack ghci
doesn't open ports with docker enabledstack ghci
doesn't bind ports with docker enabled
That's surprising. Stack sets Docker Engine to use |
I'm using docker for mac. Version 1.12.0-beta21 (build: 11019) |
I'm switching to the stable channel to see if that fixes it. I was only on beta to get early access. I'll report back soon. |
It didn't help. Here's my new Docker for Mac version. Version 1.12.0 (build: 10871) I still can't connect with |
Ok, I've done some more digging, and it appears
|
That command does work, thanks. Your explanation matches what I'm seeing. So this is on docker's end? Did you find/file a bug report I can track? On Mon, Aug 8, 2016 at 12:06 PM Emanuel Borsboom [email protected]
|
It is on Docker's end (I get the same behaviour just using plain |
stack ghci
doesn't bind ports with docker enabledstack ghci
doesn't bind ports with docker enabled on Mac OS X
stack ghci
doesn't bind ports with docker enabled on Mac OS X
Are there any more actions for us to take from stack's end? Re-open if so. |
@snap9 Not really. It doesn't look like there will be any movement on the linked docker issue either so it doubt it will be resolved soon. We stopped using stack with docker for local development, it wasn't fast enough to support hdevtools/ghc_mod either. Since stack already does a good job providing reproducible builds, we have docker turned off during development, and just use the |
@seanhess Hey, I think I got it to work. All I did was
From there I can call (One mysterious thing is that removing the |
A note to those who find this thread by Google: You may well find that the cause of your problems has to do with the hostname your socket has bound to. In my case, using the Hakyll preview server, it turns out the default hostname passed to Warp is "127.0.0.1", which only accepts connections from the container itself (in |
Hi, I'm writing a web server, and would like to use stack with docker enabled. I am able to use
stack build
andstack image container
to successfully create a docker image, then run it usingdocker run -p NNNN:NNNN
. However, during development, I normally test by running:My server starts up, and connects to its port, but I can't connect to the port from my host computer.
Steps to reproduce
All configuration is in the repo, but here is the main change from the default template:
Expected
I expected the server to respond with "Hello World" when I hit http://localhost:8010/ in my web browser.
Actual
Chrome says "The site can't be reached. Localhost refused to connect"
Stack version
Method of installation
Using homebrew.
The text was updated successfully, but these errors were encountered: