Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
402 views
in Technique[技术] by (71.8m points)

docker no space left on device macOS

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

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)?

question from:https://stackoverflow.com/questions/48668660/docker-no-space-left-on-device-macos

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...