Cause analysis:
This problem is generally caused by insufficient space in the docker root directory.
Solution:
Modify the value of its Docker Root Dir to point to a directory with a larger space.
Specific method:
1. Check the root directory of docker
[root@node2 k8s]# docker info | grep -i "docker root dir" WARNING: You're not using the default seccomp profile Docker Root Dir: /var/lib/docker
2. Check the remaining space of the directory
[root@node2 ~]# df -hl /var/lib/docker 文件系统 容量 已用 可用 已用% 挂载点 /dev/mapper/centos-var 2.0G 1.0G 1.0G 50% /var
We can change it to a larger size space, I changed it to /docker-root here.
3. Create the target directory
mkdir -p /etc/systemd/system/docker.service.d/
4. Create the configuration file
cat /etc/systemd/system/docker.service.d/devicemapper.conf [Service] ExecStart= ExecStart=/usr/bin/dockerd --graph=/docker-root
5. Restart docker
systemctl daemon-reload systemctl restart docker systemctl enable docker
Recommended tutorial:docker tutorial
The above is the detailed content of What should I do if it prompts that there is insufficient space when pulling the docker image?. For more information, please follow other related articles on the PHP Chinese website!