title: Can't type in ipdb console in docker container
body: <p>I'm using docker-compose to build my docker container and am running the container with the <code>--service-ports</code> flag like so:</p>
  
  <pre><code>docker-compose run --service-ports $(service_name) -d
  </code></pre>
  
  <p>When trying to call ipdb within a python script in the container using <code>import ipdb; ipdb.set_trace()</code> 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 (<code>CTRL+C</code>, <code>CTRL+D</code> 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.</p>
  
  <p>This is what my term looks like (I use <code>iTerm</code>):
  <a href="https://i.stack.imgur.com/awM7Q.png" rel="noreferrer"><img src="https://i.stack.imgur.com/awM7Q.png" alt="enter image description here"></a></p>
  
  <p>Any ideas how to fix this?</p>