title: Using Docker-Compose to spin up multiple instances of a container with different configurations
body: <p>I understand that you can user docker-compose with the scale command to spin up multiple containers. However, they will all have the same configuration used.</p>
  
  <p>Is it possible to launch a container on the same host with different configurations (different <code>.yml</code> files) on the same host?</p>
  
  <p>Using the following commands:</p>
  
  <pre><code>docker-compose -f dev.yml up -d
  docker-compose -f qa.yml up -d
  </code></pre>
  
  <p>only the <code>qa.yml</code> container will be running, which is not what I want.</p>
  
  <p>-- <strong>edit</strong> --</p>
  
  <p>Here's what happens when I try running both commands.</p>
  
  <pre><code>$ docker-compose -f compose/dev.yml up -d
  compose_mydocker_1 is up-to-date
  $ docker ps
  CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                  NAMES
  905912df6e48        compose_mydocker  "/sbin/my_init"     2 days ago          Up 2 days           0.0.0.0:1234-&gt;80/tcp   compose_mydocker_1
  $ docker-compose -f compose/qa.yml up -d
  Recreating compose_mydocker_1...
  $ docker ps
  CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                  NAMES
  3fc912201224        compose_mydocker  "/sbin/my_init"     5 seconds ago       Up 5 seconds        0.0.0.0:1235-&gt;80/tcp   compose_mydocker_1
  </code></pre>
  
  <p>My <code>qa.yml</code> and <code>dev.yml</code> look like this: </p>
  
  <pre><code>mydocker: 
    build: ..
  
    ports:
      - "1234:80" #for dev.yml
     #- "1235:80" for qa.yml
    environment:
      - ENVIRONMENT=dev #and vice-versa for qa
  
    volumes:
      - ../assets/images:/var/www/assets
  </code></pre>