如何修复 gitlab docker no disk space left 错误?

问题描述 投票:0回答:2

我正在使用 GitLab ci 管道构建应用程序的 docker 映像,当 docker build 命令运行时,我收到此错误:

Error processing tar file(exit status 1): write /usr/src/app/.git/objects/pack/tmp_pack_fgZvnM: no space left on device

此错误是在 COPY .. 命令期间发生的。我不知道如何解决它。如果有人知道请告诉。

感谢与问候 皮尤什

docker gitlab gitlab-ci gitlab-ci-runner
2个回答
2
投票

首先尝试运行

docker image prune
来清理机器上所有悬挂的图像。

如果问题仍然存在,请检查以下内容:

Docker 错误:设备上没有剩余空间


0
投票

此外,如果您使用 buildx,您可以定期运行此命令

docker buildx prune -f

© www.soinside.com 2019 - 2024. All rights reserved.