title: Using Weave net in docker-compose file
body: <p>I had a docker image that has Hadoop,Mesos,Marathon and Zookeeper.I distributed this image among three physical nodes. To run that image, I wrote a docker compose with three services of Zookeeper,Mesos,Marathon. I used <strong>WEAVE_CIDR</strong> for weave IP in the compose file. I defined the same IP weave for three services. When I ran the compose file, Zookeeper ran fine,but I received error for running Mesos because of repetitive IP weave. So, I tried to merge three services in one service to use just one IP weave for three of them. My new docker compose is in following:</p>
  
  <pre><code> version: '3.7'
   services:
    zookeeper:
      image: hadoop_marathon_mesos_flink_2
      command: bash -c "echo zookeeper;
      /home/zookeeper-3.4.14/bin/zkServer.sh restart;echo mesos;
      sleep 30;/home/mesos-1.7.2/build/bin/mesos-master.sh;
      echo marathon;/home/marathon-1.7.189-48bfd6000/bin/marathon"
      privileged: true
      network_mode: "bridge"
      environment:
        ZOOKEEPER_SERVER_ID: 1
        ZOOKEEPER_CLIENT_PORT: 2181
        ZOOKEEPER_TICK_TIME: 2000
        ZOOKEEPER_INIT_LIMIT: 10
        ZOOKEEPER_SYNC_LIMIT: 5
        WEAVE_CIDR: 10.32.0.1/12
        ZOOKEEPER_SERVERS: 10.32.0.1:2888:3888
        MESOS_CLUSTER: MMM
        LIBPROCESS_IP: 10.32.0.1
        MESOS_QUORUM: 1
        MESOS_LOG_DIR: /var/log/mesos
        MESOS_WORK_DIR: /var/run/mesos
        MESOS_EXECUTOR_REGISTRATION_TIMEOUT: 5mins
        HOSTNAME: 10.32.0.1
        MARATHON_ZK: zk://10.32.0.1:2181/marathon
        MARATHON_MASTER: zk://10.32.0.1:2181/mesos
        MESOS_NATIVE_JAVA_LIBRARY: /usr/local/lib/libmesos.so
        MARATHON_HTTP_PORT: 8080
        Mesos_HTTP_PORT: 5050
      expose:
       - 2181
       - 2888
       - 3888
       - 5050
       - 4040
       - 7077
       - 8080
      ports:
       - 2181:2181
       - 2888:2888
       - 3888:3888
       - 5050:5050
       - 4040:4040
       - 7077:7077
       - 8080:8080
  
   networks:
    default:
      external:
        name: weave
  </code></pre>
  
  <p>When I run <strong>docker-compose up</strong>, Zookeeper and Mesos run without error; but Marathon is not run. I want Marathon run just after Mesos,but it does not. Please any one tells me What am I doing wrong?</p>
  
  <p>Any help would be appreciated.</p>