steps:
1. mkdir /home/docker(你想要docker存放image的目录)
2. systemctl stop docker
3. vi /usr/lib/systemd/system/docker.service
4. 添加 -g /home/docker
[Unit]Description=Docker Application Container EngineDocumentation=https://docs.docker.comAfter=network.target docker.socketRequires=docker.socket[Service]Type=notifyExecStart=/usr/bin/docker daemon -g /home/docker -H fd://MountFlags=slaveLimitNOFILE=1048576LimitNPROC=1048576LimitCORE=infinity[Install]WantedBy=multi-user.target
5. cp -R /var/lib/docker/* /home/docker/
6. systemctl daemon-reload
7. systemctl start docker
done.