Expected behavior
A container port gets bound to the specified ip:port . I should be able to specified any available ip adress on my interfaces, e.g. ip of my local network connection, or an arbitrary alias created for the loopback interface.
Actual behavior
An error is displayed: Error starting userland proxy: listen tcp 192.168.0.3: 11212: bind: cannot assign requested address.
Information
pinata diagnose -u
on OSX
OS X: version 10.10.5 (build: 14F1713)
Docker.app: version v1.11.1-beta11
Running diagnostic tests:
[OK] docker-cli
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160514-015736.tar.gz
Most specific failure is: No error was detected
Your unique id is: F1CC9C62-2E2B-4229-A554-BC996E1558E0
Steps to reproduce the behavior
-
docker run -p 127.0.0.1:11212:11211 --cap-add NET_BIND_SERVICE memcached
This works well -
docker run -p 192.168.0.3:11212:11211 --cap-add NET_BIND_SERVICE memcached
Error is triggered:
docker: Error response from daemon: driver failed programming external connectivity on endpoint small_brattain (9775d50ef04f0006c406013ddd1f245984565fe949da8c41494b617f9cb58329): Error starting userland proxy: listen tcp 192.168.0.3:11212: bind: cannot assign requested address.
The specified ip (192.168.0.3) is actually assigned to my interface:
-> ifconfig en0
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 3c:15:c2:c9:e7:2a
inet6 fe80::3e15:c2ff:fec9:e72a%en0 prefixlen 64 scopeid 0x4
inet 192.168.0.3 netmask 0xffffff00 broadcast 192.168.0.255
nd6 options=1<PERFORMNUD>
media: autoselect
status: active