docker设备macOS上没有剩余空间 [英] docker no space left on device macOS

查看:62
本文介绍了docker设备macOS上没有剩余空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建需要复制一些大文件(〜75GB)的docker映像,运行以下命令时出现以下错误:

I am trying to build a docker image that requires copying some large files (~75GB) and I'm getting the following error when I run the following:

$ docker build -t my-project .

Step 8/10 : COPY some-large-directory
  failed to copy files: failed to copy directory: Error processing tar file(exit status 1): write /directory: no space left on device

我认为该错误是由容器空间不足引起的(我已经使用docker偏好将docker磁盘映像大小增加到160GB).如果是这样,如何增加macOS(高塞拉利昂)上的最大容器大小(我读取的默认值为100GB)?

I think the error is caused by the container running out of space (I already increased the docker disk image size to 160GB using docker preferences). If so how can I increase the maximum container size on macOS (high sierra) (I read the default is 100GB)?

推荐答案

Docker对象会随着时间的推移而累积,因此如果使用量很大,最终可能会耗尽可用的存储空间.您可以确认这是 docker系统df 的问题:

Docker objects accumulate over time, so with heavy usage you can eventually exhaust the available storage. You can confirm that this is the issue with docker system df:

docker system df

您可以通过修剪未使用的对象来开始回收一些空间,例如:

You can start reclaiming some space by doing a prune of your unused objects, a couple examples:

# Prune everything
docker system prune

# Only prune images
docker image prune

请务必先阅读修剪未使用的Docker对象文档,以确保您了解什么您将要丢弃.

Be sure to read the Prune unused Docker objects documentation first to make sure you understand what you'll be discarding.

如果您确实无法通过丢弃对象来回收足够的空间,则可以始终分配更多的磁盘空间.

If you really can't reclaim enough space by discarding objects, then you can always allocate more disk space.

这篇关于docker设备macOS上没有剩余空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆