title: Docker container hangs on exec command
body: <p>Trying to execute shell commands in the docker container from localhost and  inside the container , </p>
  
  <pre><code>  docker exec -i &lt;container-id&gt; sh -c "ls -l"
  </code></pre>
  
  <p>also tried <code>docker exec -ti &lt;container-id&gt; sh -c "ls -l"</code></p>
  
  <p>it lists the  output and keeps on hanging in the terminal .</p>
  
  <p>Executed the above command by login in to the container 
  It lists the output and when i  type <code>exit</code> command , it starts hanging </p>
  
  <p>Server Free RAM : 3GB </p>
  
  <pre><code>docker logs --details &lt;container-id&gt; 
  </code></pre>
  
  <p>returns empty output </p>