title: How can I run two instances of a command in a container?
body: <p>I am trying to write a docker-compose file that references a Dockerfile in the same directory. The purpose of this docker-compose file is to run the command <code>htop</code> when I build my Dockerfile image it runs htop perfectly fine and I can pass arguments to an entry point. Whenever I go to try to run docker-compose up it starts the htop instances but then exits immediately. Is there anyway I can open two terminals or two containers and each container be running an htop instance?</p>
  
  <p>Dockerfile:</p>
  
  <pre><code>FROM alpine:latest
  
  MAINTAINER anon
  
  RUN apk --no-cache add \
      htop
  
  ENTRYPOINT ["htop"]
  </code></pre>
  
  <p>docker-compose.yml</p>
  
  <p>version: '3'</p>
  
  <pre><code>services:
    htop_one:
      build: .
      environment:
        TERM: "linux"
    htop_two:
      build: .
      environment:
        TERM: "linux"
  </code></pre>
  
  <p>Any help would be greatly appreciated!</p>