[英]docker Error processing tar file(exit status 1): no space left on device
I'm continuously getting this the following error when try to build a docker image:尝试构建 docker 映像时,我不断收到以下错误:
Step 6/8 : COPY . /app
Error processing tar file(exit status 1): write /app/.git/objects/81/4f44ad8c3bef33a0bb0729bee8f251a327d9a8: no space left on device
this is sort of fixed if I use:如果我使用,这是固定的:
docker system prune
I'm delete the previous image using:我使用以下方法删除以前的图像:
docker rmi <my_image>
The problem is that this makes the whole testing very tedious, since I have to create the images from scratch after each change.问题是这使得整个测试非常乏味,因为每次更改后我都必须从头开始创建图像。
REPOSITORY TAG IMAGE ID CREATED SIZE
my_image latest 12b2499ac23d 52 minutes ago 6.67GB
That is the image I have to delete and create each time.那是我每次都必须删除和创建的图像。 I still have space left on the machine so really not finding what is the issue here:
我的机器上还有空间,所以真的找不到这里的问题:
EDIT编辑
from df -ih来自 df -ih
you can use a small but useful command:您可以使用一个小而有用的命令:
docker image prune
to delete all the unused container.It will free your needed memory.删除所有未使用的容器。它将释放您需要的 memory。
Maybe you need to exclude all unnecessary files from the context?也许您需要从上下文中排除所有不必要的文件? https://docs.docker.com/engine/reference/builder/#dockerignore-file
https://docs.docker.com/engine/reference/builder/#dockerignore-file
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.