How can I safely reinstall Docker without removing volumes?
I have an issue with my docker installation in which DNS resolution is not working within my containers. How can I safely reinstall docker on Ubuntu 16.04 without removing existing volumes?
2 Solutions collect form web for “How can I safely reinstall Docker without removing volumes?”
Before getting so drastic, try this reset tip:
pkill docker iptables -t nat -F ifconfig docker0 down brctl delbr docker0 docker -d
It will force docker to recreate the bridge and reinit all the network rules
It turns out that when uninstalling docker using apt, the
/var/lib/docker directory remains untouched, and the volumes will stay intact.
You can simply run
apt-get remove docker-ce to uninstall docker without removing your volumes.