Com.docker.slirp is using my container's ports

Expected behaviour

Can start my containers

Actual behaviour

Containers fail to start because docker has already allocated the same ports.


  • the output of:
    • Moby Menu > Diagnose & Feedback on OSX
Docker for Mac: version: mac-v1.12.0-beta16.2
OS X: version 10.11.5 (build: 15F34)
logs: /tmp/20160626-154332.tar.gz
failure: No error was detected
[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

  • a reproducible case if this is a bug, Dockerfiles FTW
  • page URL if this is a docs issue or the name of a man page
  • host distribution and version ( OSX 10.10.x, OSX 10.11.x, Windows, etc )
    OS X 10.11.5

Steps to reproduce the behavior

shutdown power off mac book 
boot macbook 
start docker beta 

start my containers - these have been booted successfully with previous docker machine releases. 

steve@Dibbler:~/dev/sites/docker/newgt$ docker-compose up -d 
Starting newgt_db_1
Starting newgt_assetic_1
Starting newgt_phpmyadmin_1
Starting newgt_php_1
Starting newgt_web_1

ERROR: for phpmyadmin  driver failed programming external connectivity on endpoint newgt_phpmyadmin_1 (e16af5215fdff024bf4937176566b03e6c982a6f74e9b44ef055fdb7842ab3ec): Bind for failed: port is already allocated

ERROR: for web  driver failed programming external connectivity on endpoint newgt_web_1 (45eacf23271942ed24dadbe5c772c04749599cee345c2d2dd0c0261c88c7d5a0): Bind for failed: port is already allocated
ERROR: Encountered errors while bringing up the project.

steve@Dibbler:~/dev/sites/docker/newgt$ lsof -n -iTCP:8013| grep LISTEN
com.docke 1046 steve   18u  IPv4 0x7050d433c43b9bcb      0t0  TCP *:8013 (LISTEN)
com.docke 1046 steve   19u  IPv6 0x7050d433b7a6ae0b      0t0  TCP [::1]:8013 (LISTEN)

steve            3129   0.0  0.1  2520688  10040   ??  Ss    3:34PM   0:00.06 com.docker.slirp --db /Users/steve/Library/Containers/com.docker.docker/Data/s40 --socket fd:3 --port-control fd:4 --vsock-path /Users/steve/Library/Containers/com.docker.docker/Data/@connect

Still nothing.

I needed to get some development work done, so tried the docker reset:

Docker > preferences > reset to factory defaults.

After this the containers were rebuilt and they started correctly. The ports are still assigned to slirp but the containers are working correctly.

steve@Dibbler:~/dev/sites/docker/newgt$ sudo lsof -i -n -P | grep TCP|grep dock

com.docke 46505          steve   11u  IPv4 0xd0e643bff97a8563      0t0    TCP *:9013 (LISTEN)
com.docke 46505          steve   13u  IPv6 0xd0e643bfff718173      0t0    TCP [::1]:9013 (LISTEN)
com.docke 46505          steve   14u  IPv4 0xd0e643bfede75183      0t0    TCP *:8013 (LISTEN)
com.docke 46505          steve   15u  IPv6 0xd0e643bfe4d3fbf3      0t0    TCP [::1]:8013 (LISTEN)
steve@Dibbler:~/dev/sites/docker/newgt$ ps aux | grep 46505 
steve           48086   0.0  0.0  2445080    832 s001  S+    8:56AM   0:00.00 grep 46505
steve           46505   0.0  0.0  2573644   3256   ??  Ss    8:40AM   0:21.81 com.docker.slirp --db /Users/steve/Library/Containers/com.docker.docker/Data/s40 --socket fd:3 --port-control fd:4 --vsock-path /Users/steve/Library/Containers/com.docker.docker/Data/@connect

I suspect that this is a duplicate of: