title: docker-compose for Detached mode
body: <p>I have following docker command to run container </p>
  
  <pre><code>docker run -d --name test -v /etc/hadoop/conf:/etc/hadoop/conf -v /usr/lib/python2.7/dist-packages/hdinsight_common:/usr/lib/python2.7/dist-packages/hdinsight_common -v /etc/hive/conf/:/etc/hive/conf/ -v /etc/tez/conf/:/etc/tez/conf/ -v /usr/hdp/2.4.2.0-258/sqoop/lib/:/usr/hdp/2.4.2.0-258/sqoop/lib/ -i -t hdinsight /bin/bash
  </code></pre>
  
  <p>This was to complicated so I was trying to create docker-compose file like this</p>
  
  <pre><code>version: '2'
  services:
    hdinsight:
      image: hdinsight
      container_name: ABC
      volumes:
       - /etc/hadoop/conf:/etc/hadoop/conf
       - /usr/lib/python2.7/dist-packages/hdinsight_common:/usr/lib/python2.7/dist-packages/hdinsight_common
       - /etc/hive/conf/:/etc/hive/conf/
       - /etc/tez/conf/:/etc/tez/conf/
       - /usr/hdp/2.4.2.0-258/sqoop/lib/:/usr/hdp/2.4.2.0-258/sqoop/lib/
      entrypoint:
       - bash
      labels:
       - "HDInsight client VM"
  </code></pre>
  
  <p>But I am not sure where to pass <code>-d</code>, <code>-i</code> &amp; <code>-t</code> flages from my original docker run command</p>
  
  <p>I was running docker-compose like this </p>
  
  <pre><code>docker-compose -f docker-compose.yml run hdinsight
  </code></pre>
  
  <p>can anyone point me to right direction here ?</p>
  
  <p>UPDATE after first answer </p>
  
  <p>I tried to run <code>docker-compose up -d</code></p>
  
  <pre><code>root@abc-docker:~/ubuntu# docker-compose up -d
  Creating ABC
  root@sbd-docker:~/ubuntu# docker ps -a
  CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                     PORTS               NAMES
  ffa4c359abf7        hdinsight           "/bin/bash"         5 seconds ago       Exited (0) 5 seconds ago                       ABC
  root@sbd-docker:~/ubuntu#
  </code></pre>
  
  <p>Dont know why its in <code>Exited</code> status</p>
  
  <p>Any idea ?</p>
  
  <p>Thanks</p>