When the docker packages are installed, the services and related docker0 network interface are enabled. In some cases, you may want to disable the docker service and the docker0 network interface as well.
This post details how to disable Docker and the docker0 interface if it is not required or if the docker0 interface is conflicting with other network interfaces/routes.
1. Ensure the Docker service is stopped:
# service docker stop # for CentOS/RHEL 6 # systemctl stop docker # for CentOS/RHEL 7
2. Remove the interface for Docker:
# ip link delete docker0
3. Remove the Docker service from the list of services started at boot:
# chkconfig --del docker # for CentOS/RHEL 6 # systemctl disable docker # for CentOS/RHEL 7
4. Optionally, you can reboot the node to ensure all services are cleared and the interface is not configured/up.
# shutdown -r now