Skip to content

write ./.docker_temp_<number>: no space left on device

0

Hi, I am facing a problem of lack of space when deploying an application. I checked the space usage with the "df -h" command and the result is displayed in the first image, which shows that there is space on the device. When running the "lsblk" command, the return shown in the second image is displayed. The results shown with the commands I ran are the current state, after increasing the disk size on AWS and running the "docker system prune -a --volumes" command. what to do to resolve it?df -hlsblk

asked 2 years ago305 views

1 Answer
0

The issue you're facing is related to Docker running out of space, despite the system showing available disk space. This can happen due to how Docker manages its storage.

First, it's important to note that the "df -h" command shows the overall disk usage, but Docker has its own storage management system. The error message "no space left on device" specifically for a Docker temporary file suggests that Docker's storage area is full, even if the overall system has space.

Here are some steps you can take to resolve this issue:

  1. You've already run "docker system prune -a --volumes", which is a good first step. This removes unused containers, networks, images, and volumes.

  2. Check Docker's current disk usage by running: "docker system df". This will show you how much space Docker is using for images, containers, and volumes.

  3. Ensure that your Docker daemon is aware of the increased disk size. You might need to restart the Docker service: "sudo systemctl restart docker"

  4. If you're using a specific storage driver for Docker, like overlay2, check its configuration and ensure it's using the newly allocated space.

  5. Verify that the increased disk space is actually available to the filesystem where Docker stores its data. You may need to extend the filesystem to use the newly allocated space.

  6. Consider adjusting Docker's storage settings in the daemon.json file. You can set a maximum size for containers and images.

  7. If the problem persists, you might want to consider moving Docker's data directory to a location with more space using the "data-root" option in Docker's configuration.

If these steps don't resolve the issue, you may need to investigate further into your specific Docker setup and application requirements. Remember that while increasing disk size is often helpful, it's also important to manage Docker's resource usage efficiently in the long term.

Sources
No space left on device when deploy ECS Fargate Service with CDK | AWS re:Post
Troubleshooting AWS CloudShell - AWS CloudShell
AWS CodeBuild Failed with Error: no space left on device | AWS re:Post

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.