I’ve had a computer in a network running a CI. Everything works locally but then as soon as I connect form VPN, I cannot access that computer anymore.
Today I figured out why 🙂
The VPN server is allocating addresses on 172.18.0.0/16 which overlaps with the docker private networks.
All I had to do was delete all the docker created networks, add this bit of configuration in /etc/docker/daemon.json
{
"default-address-pools" : [
{
"base" : "172.240.0.0/16",
"size" : 24
}
]
}
Code language: JSON / JSON with Comments (json)
restarted docker
sudo systemctl restart docker
Code language: Bash (bash)
and docker-compose up my environment.