title: Is it possible to use the same docker container for multiple websites
body: <p>until a new version of php or mysql comes out I generally always use the same setup, so at the moment I create 3 containers for every site I create:-</p>
  <p>Site 1:-</p>
  <pre><code>version: '3.1'
  
  services:
      php:
          build:
              context: .
              dockerfile: .docker/Dockerfile
          image: site1
          ports:
              - 8000:80
          restart: always
          volumes:
              - .:/var/www/html
          networks:
              - site1
      mysql:
          image: mysql:8.0
          volumes:
              - db_data:/var/lib/mysql
          restart: always
          ports:
              - 3306:3306
          environment:
              MYSQL_DATABASE: site1
              MYSQL_USER: root
              MYSQL_PASSWORD: password
              MYSQL_ROOT_PASSWORD: password
          networks:
              - larastock
      phpmyadmin:
          depends_on:
              - site1
          image: phpmyadmin/phpmyadmin
          restart: always
          ports:
              - 8001:80
          environment:
              PMA_HOST: mysql
              MYSQL_ROOT_PASSWORD: password 
          networks:
              - site1
  networks:
      site1:
  volumes:
      db_data:
  </code></pre>
  <p>Site 2:-</p>
  <pre><code>version: '3.1'
  
  services:
      php:
          build:
              context: .
              dockerfile: .docker/Dockerfile
          image: site2
          ports:
              - 8000:80
          restart: always
          volumes:
              - .:/var/www/html
          networks:
              - site2
      mysql:
          image: mysql:8.0
          volumes:
              - db_data:/var/lib/mysql
          restart: always
          ports:
              - 3306:3306
          environment:
              MYSQL_DATABASE: site1
              MYSQL_USER: root
              MYSQL_PASSWORD: password
              MYSQL_ROOT_PASSWORD: password
          networks:
              - larastock
      phpmyadmin:
          depends_on:
              - site2
          image: phpmyadmin/phpmyadmin
          restart: always
          ports:
              - 8001:80
          environment:
              PMA_HOST: mysql
              MYSQL_ROOT_PASSWORD: password 
          networks:
              - site2
  networks:
      site2:
  volumes:
      db_data:
  </code></pre>
  <p>They are identical except for the network but this means I have 6 containers when really I only need 3. Is it possible to tell site 2 to use the services that site 1 created or does this go against the whole point of docker?</p>
  <p>So what I would like is to change:-</p>
  <p>Site 1 uses php, mysql and phpmyadmin. Site 2 uses php1, mysql1, phpmyadmin1.</p>
  <p>to:</p>
  <p>both site 1 and site 2 using the same container's but having their own database:-</p>
  <p>Site 1 uses php, mysql (database site1) and phpmyadmin. Site 2 uses php, mysql (database site2) and phpmyadmin</p>