title: Invalid address. It does not belong to any of this network's subnets
body: <p>Whenever I run:</p>
  <pre><code>     docker-compose -f net.yaml up -d
  </code></pre>
  <p>I get the following errors:</p>
  <pre><code>     Creating network &quot;twisted_static-network&quot; with the default driver.
       Creating server ... error
  
       ERROR: for server  Cannot start service tcp_server: Invalid address 192.168.1.1: It 
       does not belong to any of this network's subnets
  
       ERROR: for tcp_server  Cannot start service tcp_server: Invalid address 
       192.168.1.1: It does not belong to any of this network's subnets
       ERROR: Encountered errors while bringing up the project.
  </code></pre>
  <p>I have tried:</p>
  <ol>
  <li>To <code>prune</code> the docker network,</li>
  <li>Deleted &amp; re-installed docker,</li>
  <li>Changed the ipv4 address.</li>
  </ol>
  <p>But the problem never change.</p>
  <h3>net.yaml</h3>
  <pre><code>    version: '3'
  
      services:
        tcp_server:
          image: twisted_tcp:1.0
          container_name: server
          environment:
            - LOCAL_IP=192.168.1.1
          ports:
            - 5679:5678
          privileged: true
          volumes:
            - ./twisted_server.py:/run/twisted_server.py 
          command: &gt;
              bash -c pip3 install twisted
              &amp;&amp; &quot;python3 twisted_server.py&quot;
          networks:
            static-network:
              ipv4_address: 192.168.1.1
  
        tcp_client:
          image: twisted_tcp:1.0    
          depends_on:
            - tcp_server
          container_name: client
          environment:
            - LOCAL_IP=192.168.1.2
          ports:
            - 5680:5678
          privileged: true
          volumes:
            - ./twisted_client.py:/run/twisted_client.py
          command: &gt;
            bash -c pip3 install twisted
                    &amp;&amp; &quot;python3 twisted_client.py&quot;
          networks:
            static-network:
              ipv4_address: 192.168.1.2
  
  
      networks:
        static-network:
          ipam:
            config:
              - subnet: 192.168.0.0/24
                gateway: 192.168.0.1
  </code></pre>