Container with ssh is causing issues

Expected behavior

Should be able to stop or remove running container that has ssh’d in background with -fN

Actual behavior

After container has established a background ssh connection I’m unable to docker exec onto the container nor can I stop it (with our without force) until I restart the Docker for Mac several times

Information

  • the output of:
    • Moby Menu > Diagnose & Feedback on OSX
  • 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 )

Docker for Mac: version: mac-v1.12.0.1
OS X: version 10.11.4 (build: 15E65)
logs: /tmp/D14E44B0-C3DD-4E0B-9EC2-FE9363609149/20160818-204306.tar.gz
failure: docker ps failed: Failure(“docker ps: timeout after 10.00s”)
[ERROR] docker-cli
docker ps failed
[OK] app
[OK] moby-syslog
[OK] disk
[OK] virtualization
[OK] system
[OK] menubar
[OK] osxfs
[OK] db
[OK] slirp
[OK] moby-console
[OK] logs
[OK] vmnetd
[OK] env
[OK] moby
[OK] driver.amd64-linux

Diagnostics id = D14E44B0-C3DD-4E0B-9EC2-FE9363609149

Steps to reproduce the behavior

  1. Create a generic container that can ssh onto a machine
  2. do something like `docker exec -i container_id /bin/bash -c ‘eval “$(ssh-agent -s)” && ssh -fN server’
  3. in another terminal attempt to docker exec -it container_id /bin/bash and it will not connect
  4. attempt to docker rm -f container_id and it will fail