I am trying to run docker-compose up -d
to following docker-compose.yml
file
version: '2'
services:
php7-cli:
build: php7-cli
image: php7-cli
tty: true
volumes:
- ../:/var/www/app
networks:
- my-network
networks:
my-network:
driver: bridge
The docker-compose build
builds successfully, but if I try docker-compose up
, I get the following error message:
ERROR: could not find an available, non-overlapping IPv4 address
pool among the defaults to assign to the network
When I tried to docker network ls
, I got
NETWORK ID NAME DRIVER SCOPE
7c8a6c131c1b bridge bridge local
9f16d3a33b4e host host local
24c54a4323ed none null local
I tried to remove orphan networks by docker network prune
but non of those network have been removed.
then I tried to remove the bridge
network manually docker network rm 7c8a6c131c1b
but I got this error
Error response from daemon: bridge is a pre-defined network and cannot be removed
here is my docker version
docker version
Client:
Version: 18.03.1-ce
API version: 1.37
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:17:20 2018
OS/Arch: linux/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.03.1-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:15:30 2018
OS/Arch: linux/amd64
Experimental: false