0

After installing docker (ubuntu) the default 172 ip was replaced with 10.200.x.x

sudo ip addr add dev docker0 10.200.200.90/24
sudo ip addr del dev docker0 172.17.0.1/16

The machine's ip is 10.203.32.90

Then running a private container registry with the basic command:

docker run -d -p 5000:5000 --restart=always --name registry registry:2

But then push to the registry fails with "no route to host"

docker push 10.203.32.90:5000/myimage

What have I done wrong or forgotten?

1

Solved it:

docker network ls

47ebbf46f26d bridge bridge local

docker network inspect bridge

the bridge ip was still 172.17.0.0/16

So alter the bridge ip in daemon.json

cat /etc/docker/daemon.json

{
    "bip": "10.200.200.90/24",
}

restart docker daemon and bridge is working and we can push to the registry

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.