title: Docker compose tries to create duplicate container
body: <p>I am using Docker Compose to setup multiple services so that they can talk to each over a common network.  I am running into an issue when I call command <code>docker-compose up</code></p>
  
  <p>Docker Version: Docker version 19.03.5, build 633a0ea</p>
  
  <p>Error:</p>
  
  <pre><code>Creating network "was-kerberos-database_krbnet" with the default driver
  Creating was-kerberos-database_kerberos_1 ...
  Creating was-kerberos-database_websphere_1 ...
  Creating was-kerberos-database_websphere_1 ... error
  
  ERROR: for was-kerberos-database_websphere_1  Cannot start service websphere: driver failed programming external connectivity on endpoinCreating was-kerberos-database_kerberos_1  ... done
  isten tcp 0.0.0.0:9443: bind: address already in use
  Creating was-kerberos-database_db2_1       ... done
  
  ERROR: for websphere  Cannot start service websphere: driver failed programming external connectivity on endpoint was-kerberos-database_websphere_1 (e4706a4f9ec7bb5f2ab81078c270d15c786999edf5dc8a2a235e316b62cc39da): Error starting userland proxy: listen tcp 0.0.0.0:9443: bind: address already in use
  ERROR: Encountered errors while bringing up the project.
  </code></pre>
  
  <p>It looks like docker compose is trying to bring up two duplicate instances of the <code>was-kerberos-database_websphere_1</code> instance.  Then is running into an issue because the same port is bound on both.</p>
  
  <pre><code>version: '3'
  volumes:
      krb5kdc-data:
  services:
    websphere:
      build: websphere-traditional
      ports:
        - "9043:9043"
        - "9443:9443"
        - "9080:9080"
      environment:
        - KRB5_REALM=EXAMPLE.COM
        - KRB5_KDC=kerberos
        - ENABLE_BASIC_LOGGING=true
      volumes:
        - ./trace/twas/logs:/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs
      networks:
        krbnet:
          ipv4_address: 10.5.0.2
    db2:
      build: db2
      ports:
        - "50000:50000"
      environment:
        - KRB5_REALM=EXAMPLE.COM
        - KRB5_KDC=kerberos
      privileged: True
      depends_on: 
        - "kerberos"
      networks:
        krbnet:
          ipv4_address: 10.5.0.5
    kerberos:
      build: kdc-server
      ports:
        - "88:88"
        - "464:464"
        - "749:749"
      environment:
        - KRB5_REALM=EXAMPLE.COM
        - KRB5_KDC=localhost
        - KRB5_PASS=password
      volumes:
        - krb5kdc-data:/var/lib/krb5kdc
      networks:
        krbnet:
          ipv4_address: 10.5.0.9
  networks:
    krbnet:   
      ipam:
        config:
          - subnet: 10.5.0.0/16
  </code></pre>
  
  <p>I have run <code>sudo lsof -i -P -n | grep 9443</code> to see if anything else is using this port, and nothing is.</p>