Can't type in ipdb console in docker container

I’m using docker-compose to build my docker container and am running the container with the --service-ports flag like so:

docker-compose run --service-ports $(service_name) -d

When trying to call ipdb within a python script in the container using import ipdb; ipdb.set_trace() ipdb is initialised but I cannot type anything in the console. I also have to manually restart the terminal session in order to stop it (CTRL+C, CTRL+D etc do nothing). It’s not as if the terminal has frozen either as I can still scroll back and on focus / unfocus the cursor changes appearance too.

  • CrashLoopBackOff when args are added in Kubernetes
  • Http2 protocol in an nginx reverse proxy and docker container
  • Executing docker command using golang exec fails
  • expected cgroupsPath to be of format \“slice:prefix:name\” for systemd cgroups
  • Enable port access container through dockerfile
  • Setting Up LDAP on Odoo with Docker
  • This is what my term looks like (I use iTerm):
    enter image description here

    Any ideas how to fix this?

  • Record Sound on Ubuntu Docker Image
  • What is happening in my Docker when deploying with rocketeer?
  • Reconstruct docker run command parameters from container
  • how to install libcontainer docker in place of lxc-docker
  • What are the pros and cons of docker data volumes
  • docker healthcheck in config.v2.json
  • One Solution collect form web for “Can't type in ipdb console in docker container”

    Turns out it boils down to ipdb not being compatible with eventlet.monkey_patch in the docker container.

    Simple fix, switch to pdbpp 😀

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.