Docker “ERROR: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network”

前端 未结 19 645
别那么骄傲
别那么骄傲 2020-12-12 10:48

I have a directory apkmirror-scraper-compose with the following structure:

.
├── docker-compose.yml
├── privoxy
│   ├── config
│   └── Dockerfil         


        
19条回答
  •  南方客
    南方客 (楼主)
    2020-12-12 11:08

    Killing the vpn is not needed.

    This other comment about using a new network comes pretty close to the solution for me, and was working for a while, but I found a better way thanks to some talk over in another question

    Create a network with:

    docker network create your-network --subnet 172.24.24.0/24
    

    Then, at the bottom of docker-compose.yaml, put this:

    networks:
      default:
        external: 
          name: your-network
    

    Done. No need to add networks to all container definitions etc. and you can re-use the network with other docker-compose files as well if you'd like.

提交回复
热议问题