If the Docker Engine default bridge network is conflicting with your internal network hosts access, you can change the default Docker subnet by following these steps:
- First, you need to delete the containers
sudo docker rm -f $(docker ps -a -q)
sudo systemctl stop docker
- Next, change the subnet IP inside "/etc/docker/daemon.json", by using this command:
sudo vim /etc/docker/daemon.json
- Type in the Netmask IP. With the following structure. Please keep in mind that the IP used here is an example:
{
"default-address-pools":
[
{"base":"10.10.0.0/16","size":24}
]
} - Restart the Docker Daemon by using this command:
sudo service docker restart
0 comments:
Post a Comment