Closed aysark closed 7 years ago
does it work with http://localhost:7080
?
@rneugeba no, i tried localhost, 127.0.0.1 and also the machine's ip.
When i do localhost:7080
or 127.0.0.1:7080
, it redirects me to localhost:7080/home
which is correct as that is what our app does (returns a 301 redirect to another page to follow). However, then it returns a error response or no data received response. Note: when i do the same exact steps on Ubuntu host machine, it works fine.
So my hunch is Docker for Windows is somehow not handling the request/responses correctly.
@aysark Docker for Windows doesn't intercept individual HTTP requests. The fact that your app successfully redirects to /home
also suggests that networking is working correctly.
To help us reproduce, would you provide a smaller test-case not involving your proprietary software, that demonstrates the problem?
So after some further investigating i fixed it. Basically I had to make the containerized app expect requests from the windows host machine ip (not container ip). Didn't have to do that on linux.
@aysark ok, so this was because your app was looking at the host header and expecting localhost
and seeing something else?
@friism yes. The app was designed to look for the container's IP/hostname.
@aysark roger, thanks - just checking to see if I should close the issue: in your opinion, is this a problem with how Docker works?
Well... its certainly confusing that the way Docker for Windows/OSX and Linux work. And its not documented. I spent a good time going back and forth with my colleague who was running the container fine on ubuntu and we were scratching our heads thinking it was our app. In the end.. it seems that Docker for Windows proxy process routes the request to the container as the host windows machine while- this is not the case for linux (its as the container ip).
-Aysar
On Mon, Nov 7, 2016 at 10:40 AM, Michael Friis notifications@github.com wrote:
@aysark https://github.com/aysark roger, thanks - just checking to see if I should close the issue: in your opinion, is this a problem with how Docker works?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/docker/for-win/issues/197#issuecomment-258923086, or mute the thread https://github.com/notifications/unsubscribe-auth/AAn8FMuDoLe9PmRtGboxi1TBBoSuTvECks5q73CpgaJpZM4KnyHt .
Sweet, thanks a lot. @londoncalling we should perhaps look at putting this in the FAQ, maybe @rneugeba can help.
I just lost a day to this problem on Docker for Mac. The requirement to bind to a non-localhost IP really needs to be better documented.
So after some further investigating i fixed it. Basically I had to make the containerized app expect requests from the windows host machine ip (not container ip). Didn't have to do that on linux.
can you please explain this, i'm new to flutter.
So after some further investigating i fixed it. Basically I had to make the containerized app expect requests from the windows host machine ip (not container ip). Didn't have to do that on linux.
@aysark could you shed some more light on what this involves?
Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked
I have a dockerfile thats based off ubuntu 16.04 and i install a proprietary product thats powered by tomcat and exposes a webserver. Then i run:
Using Docker for Windows latest (1.12.1), i try to access the container from my local docker build machine (
http://172.17.0.2:7080
) and am unable to- the response on chrome:But I can see in the docker internal logs that its passing my request to the container but there is an error also logged:
I do the same above steps on a linux docker host machine and i am able to access the container fine. I can only repro on a windows machine.
Information