docker images存放路径指定
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 Engine
Documentation=https://docs.docker.com
After=network.target docker.socket
Requires=docker.socket
[Service]
Type=notify
ExecStart=/usr/bin/docker daemon -g /home/docker -H fd://
MountFlags=slave
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity
[Install]
WantedBy=multi-user.target
5. cp -R /var/lib/docker/* /home/docker/
6. systemctl daemon-reload
7. systemctl start docker
done.
喜欢技术、热爱生活。