resolv.conf on host overwritten every time a Docker container is started or stopped

FIGURED IT OUT!

At some point, dhcpcd was installed on my system. No idea why. Before I decided to remove it, I edited the /etc/dhcpcd.conf file and replaced the 127.0.0.1 with 10.0.10.1 to see if /etc/resolv.conf would change. I rebooted and it indeed changed. I removed dhcpcd with apt purge dhcpcd5, rebooted, and now the nameservers remain consistent with what I have in my netplan.

Hopefully this is helpful for someone else that goes through this same problem.

Tags:

Docker

Ubuntu