title: How do I run the same docker-compose.yml several times on same docker daemon with different names?
body: <p>My situation. Trying to run a docker-compose structure several times on the same box. This is my <strong>docker-compose.yml</strong>:</p>
  
  <pre><code>version: '3'
  services:
    code:
      image: organization:java-maven
      links:
        - mysql:mysql
      volumes:
        - "${PWD}:/home/ubuntu/src"
    mysql:
      image: organization:mysql
  </code></pre>
  
  <p>Running this twice with <code>docker-compose run code mvn clean test</code> creates two containers of <code>code</code> and one container of <code>mysql</code>.</p>
  
  <p>Now, I want one <code>code</code> to be linked to one <code>mysql</code>, and <strong>another</strong> <code>code</code> linked to <strong>another</strong> <code>mysql</code>.</p>
  
  <p>How do I accomplish this? This is supposed to run on jenkins slaves and the maven executions cannot share mysql.</p>
  
  <p>I've miserably failed trying with the "-e KEY=VALUE" option for <code>docker-compose run</code> together with <code>container_name</code>in the docker compose file.</p>
  
  <p>Not sure how to approach this, please help, thank you.</p>