If the Docker-compose default IP subnet is conflicting with your internal network hosts access, you can change the default Docker subnet by following these steps:
First, you need to enter the correct folder where Docker-compose is stored.
Use these commands:
sudo vim docker-compose.ymlNext, change the subnet IP inside the docker-compose file by copying this code on the end of the docker-compose file:
networks: *(enter the desired subnet)
- subnet: 18.104.22.168/16
Remove the current container and build up the new container by using this command:
sudo docker-compose down && sudo docker-compose up -d
You can read more about changing the Docker default subnet IP address here.