title: Error on "docker-compose" when I use by pipe with sh ( echo "docker-compose... " | sh )
body: <p>I've a application which has multi container.
  to easy installation, I decide to use packaging image. 
  what I expected is like below</p>
  
  <pre><code>$ docker run my_application install | sh 
  </code></pre>
  
  <p>-> pull all related images from registry</p>
  
  <pre><code>$ docker run my_application up | sh
  </code></pre>
  
  <p>-> do some initial job and up all of containers</p>
  
  <p>But I'm stucked with below problem.</p>
  
  <pre><code>$ echo "docker-compose exec cassandra cqlsh -e 'desc keyspaces'" | sh
  Traceback (most recent call last):
    File "&lt;string&gt;", line 3, in &lt;module&gt;
    File "compose/cli/main.py", line 57, in main
    File "compose/cli/main.py", line 108, in perform_command
    File "compose/cli/main.py", line 353, in exec_command
    File ".tox/py27/lib/python2.7/site-packages/dockerpty/pty.py", line 338, in start
    File ".tox/py27/lib/python2.7/site-packages/dockerpty/io.py", line 32, in set_blocking
  ValueError: file descriptor cannot be a negative integer (-1)
  docker-compose returned -1
  </code></pre>
  
  <p>error raised from docker-compose.
  when trying like below, it works well.</p>
  
  <pre><code>$ echo "docker exec my_application_cassandra_1 cqlsh -e 'desc keyspaces'" | sh
  
  system_traces  system
  
  $ sh -c "docker-compose exec cassandra cqlsh -e 'desc keyspaces'"
  
  system_traces  system
  </code></pre>
  
  <p>but when I use pipe with docker-compose 
  it always put the error.</p>
  
  <p>Does someone have any idea how I can handle this ? </p>