What should I do if it prompts that there is insufficient space when pulling the docker image?

王林
Release: 2020-05-21 13:58:00
Original
5112 people have browsed it

What should I do if it prompts that there is insufficient space when pulling the docker image?

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
Copy after login

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
Copy after login

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/
Copy after login

4. Create the configuration file

cat /etc/systemd/system/docker.service.d/devicemapper.conf [Service] ExecStart= ExecStart=/usr/bin/dockerd --graph=/docker-root
Copy after login

5. Restart docker

systemctl daemon-reload systemctl restart docker systemctl enable docker
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!