When running docker natively on linux, it is possible to bind on any local ip within 127.0.0.0/8
docker run -p 127.0.1.2:80:80 alpine tail -f /dev/null runs successfully
This is useful to have several web servers running concurrently on ‘localhost’
On docker for mac, EADDRNOTAVAIL is returned:
docker: Error response from daemon: driver failed programming external connectivity on endpoint elegant_yalow (21a6bc7bfc1447056230fe83dcf8a512404585c6ef354eea5d2e1352387023bf): Error starting userland proxy: Failed to bind: EADDRNOTAVAIL.
pinata diagnose -u
OS X: version 10.11.4 (build: 15E65) 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/20160517-001725.tar.gz Most specific failure is: No error was detected Your unique id is: 2196A655-03A1-4E6C-B579-F5914F4F5C6C Please quote this in all correspondence.
Steps to reproduce the behavior
docker run --rm -p 127.0.1.2:80:80 alpine tail -f /dev/null