Skip to content
Advertisement

Arch Linux, Docker “No space left on device.”

All of the similar questions I see are resolved by cleaning up the images or containers or orphaned volumes but I am not having any of those problems. I even completely deleted /var/lib/docker and still nothing.

Relevant output:

JavaScript

docker info

JavaScript

One thing that makes my issue a little different (Where I think the root of the issue comes from)

Before I created a separate partition for /var, it was on my root partition, which eventually maxed out. Once it maxed out, I shrunk my home partition, create a /var partition, copied my root’s /var to my new /var, and removed my old /var. But for some reason, docker still think’s it’s maxed out? I have no idea.

I also tried to resinstall docker with sudo pacman -S docker but nothing.

Edit: I just tried it with a normal docker build . and that works fine. Somehow docker-compose thinks it’s out of memory though?

Advertisement

Answer

The python stack trace from docker-compose indicates that it can’t seem to create a temporary file. This would indicate there’s no space left in /tmp.

OP mentioned that his RAM is completely consumed when he runs docker-compose in the comments. Given that and the fact that /tmp is mounted on tmpfs it makes sense that there is no space left for Python/docker-compose to create any temporary files in /tmp.

The possible solutions are:

  • Temporarily switch the default tempfile generation location by setting one of the following environment variables: TMPDIR, TEMP, TMP (ref: Python doc)
  • Change /tmp to not use tmpfs and use disk instead.
  • Increase the amount of RAM/Swap space on your machine. (You can increase swap without messing with your partitions like so). tmpfs is backed by volatile storage, which means both RAM and Swap should theoretically work.

Note, most of these cases will result in a slowdown of your application, especially if the docker build process is I/O heavy.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement