title: docker-compose up and user inputs on stdin
body: <p>Can someone explain (and maybe give a workaround) for the following behavior of docker-compose ?</p>
  
  <p>Given the following files :</p>
  
  <p><strong>Dockerfile</strong></p>
  
  <pre><code>FROM alpine:3.8
  
  COPY ./entrypoint.sh /entrypoint.sh
  
  ENTRYPOINT [ "/entrypoint.sh" ]
  </code></pre>
  
  <p><strong>entrypoint.sh</strong></p>
  
  <pre><code>#!/bin/sh
  
  until [ ! -z "$PLOP" ]; do
      echo -n 'enter value here: '
      read PLOP
  done
  
  echo "Good ... PLOP is $PLOP"
  
  exit 1
  </code></pre>
  
  <p><strong>docker-compose.yml</strong></p>
  
  <pre><code>version: '3.7'
  
  services:
    plop:
      tty: true
      stdin_open: true
      image: webofmars/plop:latest
  </code></pre>
  
  <p>The output will be the following:</p>
  
  <p>1) <code>./entrypoint.sh</code></p>
  
  <pre><code>docker-stdin&gt; ./entrypoint.sh
  enter value here:
  CASE1
  Good ... PLOP is CASE1
  </code></pre>
  
  <p>Which seems <strong>OK</strong></p>
  
  <p>2) <code>docker-stdin&gt; docker run -it webofmars/plop</code></p>
  
  <pre><code>enter value here: CASE2
  Good ... PLOP is CASE2
  </code></pre>
  
  <p>Which seems <strong>OK</strong></p>
  
  <p>3) <code>docker-stdin&gt; docker-compose run plop</code></p>
  
  <pre><code>enter value here: CASE3
  Good ... PLOP is CASE3
  </code></pre>
  
  <p>Which seems <strong>OK</strong></p>
  
  <p>4) <code>docker-stdin&gt; docker-compose up</code></p>
  
  <pre><code>Recreating docker-stdin_plop_1 ... done
  Attaching to docker-stdin_plop_1 (last forever)
  </code></pre>
  
  <p>Which seems quite odd and <strong>NOT OK</strong> for my use case</p>
  
  <p>Did i missed something ?</p>