原创

【docker】pull 提示空间不足

前言

用Coding.net的代码扫描能力,在本地机器搭建了节点,运行的时候总是提示:

[2023-01-06 13:52:18] docker: failed to register layer: ApplyLayer exit status 1 stdout:  stderr: write /data/codedog/scantask: no space left on device.

明明给的空间很足,就是会提示没有空间。后面搜索了下,原来是镜像限制大小为10G,而coding这个代码扫描需要更大的空间。知道问题就很好解决了。

解决

解决方式为扩大镜像所需要的容量限制。增加--storage-opt dm.basesize=30G参数即可。

先停了docker

systemctl stop docker

编辑docker参数描述文件

vim /etc/systemd/system/docker.service.d/docker.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd --graph=/home/docker/lib/ --storage-driver=devicemapper --storage-opt dm.basesize=30G

重载services

systemctl daemon-reload

启动docker


systemctl start docker

重新执行pull

[root@dc1-test-www /]# docker pull coding-public-docker.pkg.coding.net/public/docker/codedog-client:2022.08.15-amd-c05dc12219a531bc7446c72f74b985c0c2f8385a
2022.08.15-amd-c05dc12219a531bc7446c72f74b985c0c2f8385a: Pulling from public/docker/codedog-client
4d32b49e2995: Pull complete 
5edf49c035e2: Pull complete 
d283887c4e67: Pull complete 
bb2c8df26c34: Pull complete 
2a869508a7b1: Pull complete 
4e6be5962510: Pull complete 
51f58b25b7e4: Pull complete 
6151e9507c44: Pull complete 
eaa311730ce2: Pull complete 
6eb2ecdb9b3d: Pull complete 
83e613794f3a: Pull complete 
298e96e954fb: Pull complete 
f1433aab8cce: Pull complete 
71adafabf4c0: Pull complete 
dde83e3cfc88: Pull complete 
26945639c306: Pull complete 
fe8b2962f0cc: Pull complete 
c0c0def6689a: Pull complete 
3297dd730262: Pull complete 
f23c7b49b518: Pull complete 
fb80c45131f4: Pull complete 
Digest: sha256:b35722abea45dbcad0d9fe46f349c312e47aede28079bbb8d6088b08555603bd
Status: Downloaded newer image for coding-public-docker.pkg.coding.net/public/docker/codedog-client:2022.08.15-amd-c05dc12219a531bc7446c72f74b985c0c2f8385a
coding-public-docker.pkg.coding.net/public/docker/codedog-client:2022.08.15-amd-c05dc12219a531bc7446c72f74b985c0c2f8385a

参考

docker 镜像超过 10G 带来的问题

基于 RHEL 7.6 安装 Docker 运行环境

温馨提示:
本文最后更新于 2023年01月06日,已超过 31 天没有更新。若文章内的图片失效(无法正常加载),请留言反馈或直接联系我
正文到此结束
本文目录