radut
(Radut)
July 7, 2016, 7:20pm
1
Expected behavior
docker start -d nginx
curl -v http://172.17.0.2/
respond with nginx index page
Actual behavior
curl hangs
curl -v http://172.17.0.2
Rebuilt URL to: http://172.17.0.2/
Trying 172.17.0.2…
connect to 172.17.0.2 port 80 failed: Operation timed out
Failed to connect to 172.17.0.2 port 80: Operation timed out
Closing connection 0
curl: (7) Failed to connect to 172.17.0.2 port 80: Operation timed out
Information
the output of:
Moby Menu > Diagnose & Feedback
on OSX
Docker for Mac: version: mac-v1.12.0-beta18-3-gec40b14
OS X: version 10.11.5 (build: 15F34)
logs: /tmp/20160707-221808.tar.gz
[OK] docker-cli
[OK] app
[OK] menubar
[OK] virtualization
[OK] system
[OK] osxfs
[OK] db
[OK] slirp
[OK] moby-console
[OK] logs
[OK] vmnetd
[OK] env
[OK] moby
[OK] driver.amd64-linux
osx 10.11.5
Steps to reproduce the behavior
docker run -d nginx
docker ps # to check the container id
docker inspect [container name]
curl -v http://[dockerip]/
1 Like
shiroyuki
(Juti Noppornpitak)
July 13, 2016, 11:48pm
2
Not forwarding ports by default is an expected and documented behaviour of Docker.
Therefore, this is not a defect.
arachnid
(Arachnid)
July 14, 2016, 4:24pm
3
The question isn’t about forwarding ports, though, it’s about bridging network interfaces. This behaves differently on docker in linux, so I’d argue that if it’s not a defect, it’s a discrepancy, at a minimum.
radut
(Radut)
July 14, 2016, 7:32pm
4
I want bridge access as linux works, not forwarding, because if I start for example a mysql container i want to access it by ip:3306 not localhost:randomPort…
dmaze
(David Maze)
July 14, 2016, 8:16pm
5
So use docker run -p 3306:3306
, and it’ll be visible on your host system at port 3306.
radut
(Radut)
July 14, 2016, 8:21pm
6
I know what are my alternatives, but if I already have an mysql locally, or another mysql container, i have to find next available port and so on…
I like docker and I would really love to see this feature on mac too, and I know that there are a lot o f people who agrees with me.
1 Like