CentOS7虚拟机中Docker 17.09.1-ce启动报错:driver not supported求助
Hey there, I’ve hit this exact issue before with older Docker releases on CentOS 7—let’s get this sorted out. That error pops up because Docker can’t use the storage driver it’s configured to rely on, which is super common when mixing older Docker versions with CentOS 7’s default setup. Here’s how to fix it step by step:
1. Check your current storage driver setup
First, let’s confirm what driver Docker is trying to use. Run this command to pull up the relevant info:
docker info | grep -i storage
You’ll likely see something like Storage Driver: overlay2—the problem here is that Docker 17.09.1-ce has limited support for overlay2 on CentOS 7 (it depends on newer kernel features that aren’t always enabled by default). We’ll need to switch to a fully compatible driver.
2. Configure Docker to use a supported storage driver
The most reliable driver for Docker 17.09.1-ce on CentOS 7 is overlay (not overlay2) or devicemapper. Let’s go with overlay since it’s lighter and easier to set up:
- Create or edit the Docker daemon config file:
vi /etc/docker/daemon.json - Add this content (if the file already has existing configs, just add the
"storage-driver"line to the JSON object):{ "storage-driver": "overlay" } - Save and exit the editor.
3. Restart Docker to apply changes
Reload the daemon config and restart Docker to make the new driver take effect:
systemctl daemon-reload systemctl restart docker
4. Verify the fix
First, confirm the storage driver has updated:
docker info | grep -i storage
You should now see Storage Driver: overlay. Now test with the hello-world image again:
docker run hello-world
This should run successfully without the graphdriver error.
If it’s still not working:
Check kernel module support: Make sure the
overlaykernel module is loaded. Run this to check:lsmod | grep overlayIf you get no output, load the module manually:
modprobe overlayThen restart Docker once more.
Clean up old Docker data (backup first!): If you previously used a different storage driver, leftover data might be causing conflicts. Stop Docker, back up your existing data, then reset the storage system:
systemctl stop docker cp -r /var/lib/docker /var/lib/docker.bak rm -rf /var/lib/docker systemctl start dockerThis will reinitialize Docker’s storage with the new driver.
内容的提问来源于stack exchange,提问作者Sredny M Casanova

